Symbolic Analysis for Data Plane Programs Specialization
Abstract
1 Introduction
2 The P4 Language
2.1 PHV in P4
2.2 P4 Parser Block
2.3 P4 Control Block
3 Symbolic Analysis On Headers
3.1 Symbolic Analysis Considerations
Header | HVV, Invalid (I), Valid (V) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ethernet | I | I | I | I | I | I | I | I | V | V | V | V | V | V | V | V |
tunnel | I | I | I | I | V | V | V | V | I | I | I | I | V | V | V | V |
ipv4 | I | I | V | V | I | I | V | V | I | I | V | V | I | I | V | V |
tcp | I | V | I | V | I | V | I | V | I | V | I | V | I | V | I | V |
3.2 Performing Symbolic Analysis of a P4 Program
3.2.1 Symbolic Execution of the Condition Category.
3.2.2 Symbolic Execution of a Header Method Category.
3.2.3 Complexity of a P4 Program Symbolic Execution.
3.3 Minimal Set of Vectors
4 Generating A Deparser DAG
4.1 Transformation of a Deparser DAG
4.2 Evaluation of Transitively Closed DAG Implementation
4.2.1 DAG Implementation on a CPU.
4.2.2 DAG Implementation on Specialized Architectures.
5 P4 Program Specialization
5.1 Specialization of P4 Blocks
5.2 Specializing the Deparser
5.3 Optimal Deparser DAG
6 P4 Deparser Specialization Example
6.1 Example of Symbolic Analysis
Header Validity Field Value | ||||
---|---|---|---|---|
ethernet | tunnel | ipv4 | tcp | |
Original set of HVVs | False | False | False | False |
set of HVVs after analysis of Listing 2 (parser) | True | False | False | False |
True | True | False | False | |
True | False | True | False | |
True | False | True | True | |
set of HVVs after analysis of Listing 3 (processing) | True | False | False | False |
True | True | False | False | |
True | False | True | False | |
True | False | True | True | |
True | True | True | False | |
True | True | True | True |
6.1.1 Parser Symbolic Analysis.
6.1.2 Processing Block Symbolic Analysis.
6.2 Partial Evaluation of the Deparser
7 Methodology AND Results
7.1 Evaluating Graph Optimization
7.2 Presentation of Test Cases
7.3 Results
Program | T0 | T1 | T2 | T3 | T4 | T5 | T6 | |
---|---|---|---|---|---|---|---|---|
Specialized | # Nodes | 6 | 7 | 9 | 13 | 13 | 13 | 12 |
# Paths | 6 | 7 | 9 | 129 | 1,024 | 512 | 512 | |
Unspecialized | # Nodes | 6 | 7 | 9 | 13 | 13 | 13 | 13 |
# Paths | 16 | 32 | 128 | 2,048 | 2,048 | 2,048 | 2,048 |
Bus width | Code | Unspecialized Program | Specialized Program | Gain | ||||||
---|---|---|---|---|---|---|---|---|---|---|
LUTs | FFs | Freq. (MHz) | LUTs | FFs | Freq.(MHz) | LUTs | FFs | Freq. | ||
64 bits | T0 | 836 | 441 | 699 | 474 | 374 | 740 | 76 % | 17.9 % | 5.5 % |
T1 | 1,464 | 393 | 740 | 614 | 397 | 740 | 138 % | \(-\)1 % | 0 % | |
T2 | 1,681 | 393 | 680 | 718 | 402 | 740 | 134 % | \(-\)2.2 % | 8.1 % | |
T3 | 2,316 | 399 | 694 | 1,053 | 375 | 666 | 120 % | 6.4 % | \(-\)4.2 % | |
T4 | 2,355 | 399 | 653 | 1,241 | 372 | 699 | 90 % | 7.3 % | 6.6 % | |
T5 | — | — | — | 1,124 | 374 | 746 | 110 % | 6.7 % | 12.5 % | |
T6 | — | — | — | 1,116 | 373 | 671 | 111 % | 7 % | 2.7 % | |
(“—” indicates same results as previous line) | Average | 111 % | 6 % | 4.5 % | ||||||
256 bits | T0 | 1,613 | 1,353 | 684 | 1,293 | 1,294 | 671 | 24.8 % | 4.6 % | \(-\)1.9 % |
T1 | 2,633 | 1,493 | 662 | 1,557 | 1,373 | 684 | 69.1 % | 8.7 % | 3.2 % | |
T2 | 3,907 | 1,575 | 662 | 1,514 | 1,378 | 662 | 158.1 % | 14.3 % | 0 % | |
T3 | 5,526 | 1,586 | 666 | 3,452 | 1,507 | 662 | 60.1 % | 5.2 % | \(-\)0.6 % | |
T4 | 6,154 | 1,597 | 666 | 4,077 | 1,568 | 680 | 51 % | 1.9 % | 2.1 % | |
T5 | — | — | — | 4,195 | 1,572 | 675 | 47 % | 1.6 % | 1.3 % | |
T6 | — | — | — | 3,714 | 1,519 | 662 | 66 % | 5.1 % | \(-\)0.6 % | |
Average | 68 % | 6 % | 0.5 % | |||||||
512 bits | T0 | 5,992 | 2,635 | 625 | 4,824 | 2,525 | 625 | 24.2 % | 4.4 % | 0 % |
T1 | 6,732 | 2,908 | 625 | 5,489 | 2,690 | 628 | 22.7 % | 8.1 % | 0.5 % | |
T2 | 8,395 | 3,114 | 653 | 5,552 | 2,693 | 625 | 51.2 % | 15.6 % | \(-\)4.5 % | |
T3 | 12,415 | 3,302 | 632 | 9,400 | 3,130 | 609 | 32.1 % | 5.5 % | \(-\)3.8 % | |
T4 | 12,165 | 3,260 | 632 | 9,811 | 3,178 | 632 | 24 % | 2.6 % | 0 % | |
T5 | — | — | — | 8,626 | 3,064 | 625 | 41 % | 6.4 % | \(-\)1.1 % | |
T6 | — | — | — | 7,911 | 2,981 | 625 | 53.8 % | 9.4 % | \(-\)1.1 % | |
Average | 35.6 % | 7.4 % | \(-\)1.4 % |
Code | Work | Slices | LUTs | FFs | BRAMs | Throughput |
---|---|---|---|---|---|---|
T2 | This work | 2.2 k | 5.6 k | 2.7 k | 0 | 320 Gb/s |
Xilinx SDnet | N/A | 98 k | 119 k | 149.5 | 240 Gb/s | |
Benáček et al. [3] | 20 k | N/A | N/A | N/A | 120 Gb/s | |
T3 | This work | 2.5 k | 9.4 k | 3.2 k | 0 | 310 Gb/s |
Xilinx SDnet | N/A | 139 k | 165 k | 229.5 | 240 Gb/s | |
Benáček et al. [3] | 24 k | N/A | N/A | N/A | 120 Gb/s |
8 Related Work
8.1 Program Specialization
8.2 P4 Program Analysis
9 Conclusion
Acknowledgments
Footnotes
References
Index Terms
- Symbolic Analysis for Data Plane Programs Specialization
Recommendations
Design Principles for Packet Deparsers on FPGAs
FPGA '21: The 2021 ACM/SIGDA International Symposium on Field-Programmable Gate ArraysThe P4 language has drastically changed the networking field as it allows to quickly describe and implement new networking applications. Although a large variety of applications can be described with the P4 language, current programmable switch ...
Combining Program and Data Specialization
Program and data specialization have always been studied separately, although they are both aimed at processing early computations. Program specialization encodes the result of early computations into a new program; while data specialization encodes the ...
Accelerating OCaml Programs on FPGA
AbstractThis paper aims to exploit the massive parallelism of Field-Programmable Gate Arrays (FPGAs) by programming them in OCaml, a multiparadigm and statically typed language. It first presents O2B, an implementation of the OCaml virtual machine using a ...
Comments
Please enable JavaScript to view thecomments powered by Disqus.Information & Contributors
Information
Published In
Publisher
Association for Computing Machinery
New York, NY, United States
Publication History
Check for updates
Author Tags
Qualifiers
- Research-article
- Refereed
Funding Sources
- Kaloom, Intel, Noviflow, the Natural Sciences and Engineering Research Council of Canada (CRSNG)
- Prompt.
Contributors
Other Metrics
Bibliometrics & Citations
Bibliometrics
Article Metrics
- 0Total Citations
- 1,484Total Downloads
- Downloads (Last 12 months)448
- Downloads (Last 6 weeks)46
Other Metrics
Citations
View Options
View options
View or Download as a PDF file.
PDFeReader
View online with eReader.
eReaderHTML Format
View this article in HTML Format.
HTML FormatLogin options
Check if you have access through your login credentials or your institution to get full access on this article.
Sign in