Mohsen Rahmati;François-Raymond Boyer;Bill Pontikakis;Jean Pierre David;Yvon Savaria
{"title":"P4Muse: Enabling Modular P4 Programming via Compiler-Managed Code Merging Without Syntax Modifications","authors":"Mohsen Rahmati;François-Raymond Boyer;Bill Pontikakis;Jean Pierre David;Yvon Savaria","doi":"10.1109/ACCESS.2025.3589353","DOIUrl":null,"url":null,"abstract":"Domain-specific programming languages such as P4 enable flexible and high-performance packet processing for programming network data planes. However, many P4 programs remain monolithic, limiting the development of modular and reusable protocols and libraries. Introducing modularity to P4 has proven challenging, as existing approaches—such as trans-compilers and virtualization—often sidestep direct integration with the P4 language and compiler, constraining backward compatibility and extensibility. This paper introduces P4Muse (P4 Modularity and Unification for Seamless Extensibility), an open-source P4C compiler extension that enhances the modularity of P4 without requiring new syntax or annotations. P4Muse is developed by integrating new compiler passes for automatic code merging, fostering modular design and reuse. We demonstrate its benefits through three classes of use cases that support P4 modularity, enabling code reusability, data plane pipeline composition, and vendor-customer compatibility. using the V1Model architecture and the BMv2 software switch. Our results show that P4Muse effectively supports modular P4 program development without altering existing P4 syntax, providing a robust solution that significantly improves code reusability, flexibility, and extensibility while maintaining backward compatibility.","PeriodicalId":13079,"journal":{"name":"IEEE Access","volume":"13 ","pages":"124138-124157"},"PeriodicalIF":3.4000,"publicationDate":"2025-07-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=11080440","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Access","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11080440/","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0
Abstract
Domain-specific programming languages such as P4 enable flexible and high-performance packet processing for programming network data planes. However, many P4 programs remain monolithic, limiting the development of modular and reusable protocols and libraries. Introducing modularity to P4 has proven challenging, as existing approaches—such as trans-compilers and virtualization—often sidestep direct integration with the P4 language and compiler, constraining backward compatibility and extensibility. This paper introduces P4Muse (P4 Modularity and Unification for Seamless Extensibility), an open-source P4C compiler extension that enhances the modularity of P4 without requiring new syntax or annotations. P4Muse is developed by integrating new compiler passes for automatic code merging, fostering modular design and reuse. We demonstrate its benefits through three classes of use cases that support P4 modularity, enabling code reusability, data plane pipeline composition, and vendor-customer compatibility. using the V1Model architecture and the BMv2 software switch. Our results show that P4Muse effectively supports modular P4 program development without altering existing P4 syntax, providing a robust solution that significantly improves code reusability, flexibility, and extensibility while maintaining backward compatibility.
特定于领域的编程语言(如P4)为网络数据平面编程提供了灵活和高性能的数据包处理。然而,许多P4程序仍然是单一的,限制了模块化和可重用协议和库的开发。将模块化引入P4已被证明是具有挑战性的,因为现有的方法(如转换编译器和虚拟化)通常会回避与P4语言和编译器的直接集成,从而限制了向后兼容性和可扩展性。本文介绍了P4Muse (P4 Modularity and Unification for Seamless Extensibility),这是一个开源的P4C编译器扩展,在不需要新的语法或注释的情况下增强了P4的模块化。P4Muse是通过集成新的编译器通道来实现自动代码合并,促进模块化设计和重用而开发的。我们通过支持P4模块化、支持代码可重用性、数据平面管道组合和供应商-客户兼容性的三类用例来演示它的好处。采用v1模型架构和BMv2软件交换机。我们的研究结果表明,P4Muse在不改变现有P4语法的情况下有效地支持模块化P4程序开发,提供了一个强大的解决方案,显著提高了代码的可重用性、灵活性和可扩展性,同时保持了向后兼容性。
IEEE AccessCOMPUTER SCIENCE, INFORMATION SYSTEMSENGIN-ENGINEERING, ELECTRICAL & ELECTRONIC
CiteScore
9.80
自引率
7.70%
发文量
6673
审稿时长
6 weeks
期刊介绍:
IEEE Access® is a multidisciplinary, open access (OA), applications-oriented, all-electronic archival journal that continuously presents the results of original research or development across all of IEEE''s fields of interest.
IEEE Access will publish articles that are of high interest to readers, original, technically correct, and clearly presented. Supported by author publication charges (APC), its hallmarks are a rapid peer review and publication process with open access to all readers. Unlike IEEE''s traditional Transactions or Journals, reviews are "binary", in that reviewers will either Accept or Reject an article in the form it is submitted in order to achieve rapid turnaround. Especially encouraged are submissions on:
Multidisciplinary topics, or applications-oriented articles and negative results that do not fit within the scope of IEEE''s traditional journals.
Practical articles discussing new experiments or measurement techniques, interesting solutions to engineering.
Development of new or improved fabrication or manufacturing techniques.
Reviews or survey articles of new or evolving fields oriented to assist others in understanding the new area.