Advanced Search
Turn off MathJax
Article Contents
TU Huaqing, WANG Yuanhong, XU Qi, ZHU Jun, ZOU Tao, LONG Keping. A Polymorphic Network Backend Compiler for Domestic Switching Chips[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT250132
Citation: TU Huaqing, WANG Yuanhong, XU Qi, ZHU Jun, ZOU Tao, LONG Keping. A Polymorphic Network Backend Compiler for Domestic Switching Chips[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT250132

A Polymorphic Network Backend Compiler for Domestic Switching Chips

doi: 10.11999/JEIT250132 cstr: 32379.14.JEIT250132
Funds:  The National Key Research and Development Project of China ( 2022YFB2901503), The National Natural Science Foundation of China (U22A2005), The Key R&D Program of Zhejiang (2024SSYS0001), China Postdoctoral Science Foundation (2024M75986).
  • Received Date: 2025-03-05
  • Accepted Date: 2025-11-03
  • Rev Recd Date: 2025-10-16
  • Available Online: 2025-11-08
  •   Objective  The P4 language and programmable switching chips offer a feasible approach for deploying polymorphic networks. However, polymorphic network packets written in P4 cannot be directly executed on the domestically produced TsingMa.MX programmable switching chip developed by Centec, which necessitates the design of a specialized compiler to translate and deploy the P4 language on this chip. Existing backend compilers are mainly designed and optimized for software-programmable switches such as BMv2, FPGAs, and Intel Tofino series chips, rendering them unsuitable for compiling polymorphic network programs for the TsingMa.MX chip. To resolve this limitation, a backend compiler named p4c-TsingMa is proposed for the TsingMa.MX switching chip. This compiler enables the translation of high-level network programming languages into executable formats for the TsingMa.MX chip, thereby supporting the concurrent parsing and forwarding of multiple network modal packets.  Methods  p4c-TsingMa first employs a preorder traversal approach to extract key information, including protocol types, protocol fields, and actions, from the Intermediate Representation (IR). It then performs instruction translation to generate corresponding control commands for the TsingMa.MX chip. Additionally, p4c-TsingMa adopts a User Defined Field (UDF) entry merging method to consolidate matching instructions from different network modalities into a unified lookup table. This design enables the extraction of multiple modal matching entries in a single operation, thereby enhancing chip resource utilization.  Results and Discussions  The p4c-TsingMa compiler is implemented in C++, mapping network modal programs written in the P4 language into configuration instructions for the TsingMa.MX switching chip. A polymorphic network packet testing environment (Fig. 7) is established, where multiple types of network data packets are simultaneously transmitted to the same switch port. According to the configured flow tables, the chip successfully identifies polymorphic network data packets and forwards them to their corresponding ports (Fig. 9). Additionally, the table entry merging algorithm improves register resource utilization by 37.5% to 75%, enabling the chip to process more than two types of modal data packets concurrently.  Conclusions  A polymorphic network backend compiler, p4c-TsingMa, is designed specifically for domestic switching chips. By utilizing the FlexParser and FlexEdit functions of the TsingMa chip, the compiler translates polymorphic network programs into executable commands for the TsingMa.MX chip, enabling the chip to parse and modify polymorphic data packets. Experimental results demonstrate that p4c-TsingMa achieves high compilation efficiency and improves register resource utilization by 37.5% to 75%.
  • loading
  • [1]
    凃化清, 廖君虎, 朱俊, 等. 多模态网络环境下网络模态共存与优化部署方法[J]. 电子学报, 2025, 53(5): 1650–1660. doi: 10.12263/DZXB.20250015.

    TU Huaqing, LIAO Junhu, ZHU Jun, et al. Network modal coexistence and optimal deployment method in polymorphic network environment[J]. Acta Electronica Sinica, 2025, 53(5): 1650–1660. doi: 10.12263/DZXB.20250015.
    [2]
    WU Jiangxing, LI Junfei, SUN Penghao, et al. Theoretical framework for a polymorphic network environment[J]. Engineering, 2024, 39: 222–234. doi: 10.1016/j.eng.2024.01.018.
    [3]
    邬江兴, 胡宇翔. 网络技术体系与支撑环境分离的发展范式[J]. 信息通信技术与政策, 2021, 47(8): 1–11. doi: 10.12267/j.issn.2096-5931.2021.08.001.

    WU Jiangxing and HU Yuxiang. The development paradigm of separation between network technical system and supporting environment[J]. Information and Communications Technology and Policy, 2021, 47(8): 1–11. doi: 10.12267/j.issn.2096-5931.2021.08.001.
    [4]
    HU Yuxiang, LI Dan, SUN Penghao, et al. Polymorphic smart network: An open, flexible and universal architecture for future heterogeneous networks[J]. IEEE Transactions on Network Science and Engineering, 2020, 7(4): 2515–2525. doi: 10.1109/tnse.2020.3006249.
    [5]
    BOSSHART P, DALY D, GIBB G, et al. P4: Programming protocol-independent packet processors[J]. ACM SIGCOMM Computer Communication Review, 2014, 44(3): 87–95. doi: 10.1145/2656877.2656890.
    [6]
    Tofino[EB/OL]. https://www.barefootnetworks.com/products/brief-tofino, 2025.
    [7]
    Centec. CTC8180[EB/OL]. https://www.centec.com/silicon/26, 2025.
    [8]
    HAUSER F, HÄBERLE M, MERLING D, et al. A survey on data plane programming with P4: Fundamentals, advances, and applied research[J]. Journal of Network and Computer Applications, 2023, 212: 103561. doi: 10.1016/j.jnca.2022.103561.
    [9]
    YANG Y Fifan, HE Lin, ZHOU Jiasheng, et al. P4runpro: Enabling runtime programmability for RMT programmable switches[C]. The ACM SIGCOMM 2024 Conference, Sydney, Australia, 2024: 921–937. doi: 10.1145/3651890.3672230.
    [10]
    CHEN Zhikang, FENG Yong, LIU Shuxin, et al. OptimusPrime: Unleash dataplane programmability through a transformable architecture[C]. The ACM SIGCOMM 2024 Conference, Sydney, Australia, 2024: 904–920. doi: 10.1145/3651890.3672214.
    [11]
    WANG Tao, YANG Xiangrui, ANTICHI G, et al. Isolation mechanisms for high-speed packet-processing pipelines[C]. The 19th USENIX Symposium on Networked Systems Design and Implementation, Renton, USA, 2022: 1289–1305.
    [12]
    LU Chenyunfei, TANG Zhu, PENG Wei, et al. Running P4 programs on general programmable network interconnection chips[C]. 2023 Fourth International Conference on Frontiers of Computers and Communication Engineering, Xiamen, China, 2023: 1–6. doi: 10.1109/fcce58525.2023.00008.
    [13]
    DA ROBIN D and KHAN J I. An open-source P416 compiler backend for reconfigurable match-action table switches: Making networking innovation accessible[J]. Computer Networks, 2024, 242: 110246. doi: 10.1016/j.comnet.2024.110246.
    [14]
    GAO Jiaqi, ZHAI Ennan, LIU H H, et al. Lyra: A cross-platform language and compiler for data plane programming on heterogeneous ASICs[C]. The Annual Conference of the ACM Special Interest Group on Data Communication on the Applications, Technologies, Architectures, and Protocols for Computer Communication, 2020: 435–450. doi: 10.1145/3387514.3405879.
    [15]
    LI Yifan, GAO Jiaqi, ZHAI Ennan, et al. Cetus: Releasing P4 programmers from the chore of trial and error compiling[C].The 19th USENIX Symposium on Networked Systems Design and Implementation, Renton, USA, 2022: 371–385.
    [16]
    DANGETI T K, KEERTHY S V, and UPADRASTA R. P4LLVM: An LLVM based P4 compiler[C]. The 26th International Conference on Network Protocols, Cambridge, UK, 2018: 424–429. doi: 10.1109/icnp.2018.00059.
    [17]
    WANG Han, SOULÉ R, DANG H T, et al. P4FPGA: A rapid prototyping framework for P4[C]. The Symposium on SDN Research, Santa Clara, USA, 2017: 122–135. doi: 10.1145/3050220.3050234.
    [18]
    GAO Xiangyu, KIM T, WONG M D, et al. Switch code generation using program synthesis[C]. The Annual Conference of the ACM Special Interest Group on Data Communication on the Applications, Technologies, Architectures, and Protocols for Computer Communication, 2020: 44–61. doi: 10.1145/3387514.3405852.
    [19]
    p4c, a reference compiler for P4 programming language[EB/OL]. https://github.com/p4lang/p4c, 2025.
    [20]
    VENKATAKEERTHY S, AGGARWAL R, JAIN S, et al. IR2VEC: LLVM IR based scalable program embeddings[J]. ACM Transactions on Architecture and Code Optimization (TACO), 2020, 17(4): 32. doi: 10.1145/3418463.
    [21]
    HARKOUS H, PAPAGIANNI C, DE SCHEPPER K, et al. Virtual queues for P4: A poor man’s programmable traffic manager[J]. IEEE Transactions on Network and Service Management, 2021, 18(3): 2860–2872. doi: 10.1109/tnsm.2021.3077051.
    [22]
    VENKATAKEERTHY S, ANDALURI Y, DEY S, et al. Packet processing algorithm identification using program embeddings[C]. The 6th Asia-Pacific Workshop on Networking, Fuzhou, China, 2022: 76–82. doi: 10.1145/3542637.3542649.
  • 加载中

Catalog

    通讯作者: 陈斌, bchen63@163.com
    • 1. 

      沈阳化工大学材料科学与工程学院 沈阳 110142

    1. 本站搜索
    2. 百度学术搜索
    3. 万方数据库搜索
    4. CNKI搜索

    Figures(8)  / Tables(5)

    Article Metrics

    Article views (98) PDF downloads(17) Cited by()
    Proportional views
    Related

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return