{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,11,20]],"date-time":"2025-11-20T13:36:03Z","timestamp":1763645763025,"version":"3.45.0"},"reference-count":54,"publisher":"MDPI AG","issue":"11","license":[{"start":{"date-parts":[[2025,11,20]],"date-time":"2025-11-20T00:00:00Z","timestamp":1763596800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100000038","name":"NSERC","doi-asserted-by":"publisher","award":["IRCPJ-548237-18 CRSNG"],"award-info":[{"award-number":["IRCPJ-548237-18 CRSNG"]}],"id":[{"id":"10.13039\/501100000038","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Future Internet"],"abstract":"<jats:p>Programmable data planes are increasingly essential for enabling In-band Network Telemetry (INT), fine-grained monitoring, and congestion-aware packet processing. Although the P4 language provides a high-level abstraction to describe such behaviors, implementing them efficiently on FPGA-based platforms remains challenging due to hardware constraints and limited compiler support. Building on P4THLS framework, which leverages HLS for FPGA data-plane programmability, this paper extends the approach by introducing support for P4-style stateful objects and a structured metadata propagation mechanism throughout the processing pipeline. These extensions enrich pipeline logic with real-time context and flow-level state, thereby facilitating advanced applications while preserving programmability. The generated codebase remains extensible and customizable, allowing developers to adapt the design to various scenarios. We implement two representative use cases to demonstrate the effectiveness of the approach: an INT-enabled forwarding engine that embeds hop-by-hop telemetry into packets and a congestion-aware switch that dynamically adapts to queue conditions. Evaluation of an AMD Alveo U280 FPGA implementation reveals that incorporating INT support adds roughly 900 LUTs and 1000 Flip-Flops relative to the baseline switch. Furthermore, the proposed meter maintains rate measurement errors below 3% at 700 Mbps and achieves up to a 5\u00d7 reduction in LUT and 2\u00d7 reduction in Flip-Flop usage compared to existing FPGA-based stateful designs, substantially expanding the applicability of P4THLS for complex and performance-critical network functions.<\/jats:p>","DOI":"10.3390\/fi17110530","type":"journal-article","created":{"date-parts":[[2025,11,20]],"date-time":"2025-11-20T13:25:27Z","timestamp":1763645127000},"page":"530","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["A Stateful Extension to P4THLS for Advanced Telemetry and Flow Control"],"prefix":"10.3390","volume":"17","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-7767-2986","authenticated-orcid":false,"given":"Mostafa","family":"Abbasmollaei","sequence":"first","affiliation":[{"name":"MOTCE Laboratory, Department of Computer Engineering, Polytechnique Montr\u00e9al, Montr\u00e9al, QC H3T 1J4, Canada"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9000-5467","authenticated-orcid":false,"given":"Tarek","family":"Ould-Bachir","sequence":"additional","affiliation":[{"name":"MOTCE Laboratory, Department of Computer Engineering, Polytechnique Montr\u00e9al, Montr\u00e9al, QC H3T 1J4, Canada"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3404-9959","authenticated-orcid":false,"given":"Yvon","family":"Savaria","sequence":"additional","affiliation":[{"name":"Department of Electrical Engineering, Polytechnique Montr\u00e9al, Montr\u00e9al, QC H3T 1J4, Canada"}]}],"member":"1968","published-online":{"date-parts":[[2025,11,20]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Govindan, R., Minei, I., Kallahalla, M., Koley, B., and Vahdat, A. (2016, January 22\u201326). Evolve or Die: High-Availability Design Principles Drawn from Googles Network Infrastructure. Proceedings of the 2016 ACM SIGCOMM Conference, Florianopolis, Brazil. SIGCOMM \u201916.","DOI":"10.1145\/2934872.2934891"},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"103561","DOI":"10.1016\/j.jnca.2022.103561","article-title":"A survey on data plane programming with P4: Fundamentals, advances, and applied research","volume":"212","author":"Hauser","year":"2023","journal-title":"J. Netw. Comput. Appl."},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"5081","DOI":"10.1109\/TNET.2024.3448244","article-title":"Information-Sensitive In-Band Network Telemetry in P4-Based Programmable Data Plane","volume":"32","author":"Xu","year":"2024","journal-title":"IEEE\/ACM Trans. Netw."},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Li, Y., Ren, Z., Li, W., Liu, X., and Chen, K. (2025, January 7\u20138). Congestion Control for AI Workloads with Message-Level Signaling. Proceedings of the 9th Asia-Pacific Workshop on Networking, Shanghai, China. APNET \u201925.","DOI":"10.1145\/3735358.3735378"},{"key":"ref_5","unstructured":"Turkovic, B., Biswal, S., Vijay, A., H\u00fcfner, A., and Kuipers, F. (July, January 28). P4QoS: QoS-based Packet Processing with P4. Proceedings of the IEEE International Conference on Network Softwarization (NetSoft), Tokyo, Japan."},{"key":"ref_6","unstructured":"Alcoz, A.G., Vass, B., Namyar, P., Arzani, B., R\u00e9tv\u00e1ri, G., and Vanbever, L. (2025, January 28\u201330). Everything matters in programmable packet scheduling. Proceedings of the 22nd USENIX Symposium on Networked Systems Design and Implementation, Philadelphia, PA, USA. NSDI \u201925."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Abbasmollaei, M., Ould-Bachir, T., and Savaria, Y. (2024, January 6\u20139). Normal and Resilient Mode FPGA-based Access Gateway Function Through P4-generated RTL. Proceedings of the 2024 20th International Conference on the Design of Reliable Communication Networks (DRCN), Montreal, QC, Canada.","DOI":"10.1109\/DRCN60692.2024.10539150"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3699514","article-title":"A Survey on Architectures, Hardware Acceleration and Challenges for In-Network Computing","volume":"18","author":"Nickel","year":"2024","journal-title":"ACM Trans. Reconfigurable Technol. Syst."},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3532989","article-title":"Pushing the Level of Abstraction of Digital System Design: A Survey on How to Program FPGAs","volume":"55","author":"Sozzo","year":"2022","journal-title":"ACM Comput. Surv."},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"87","DOI":"10.1145\/2656877.2656890","article-title":"P4: Programming Protocol-Independent Packet Processors","volume":"44","author":"Bosshart","year":"2014","journal-title":"SIGCOMM Comput. Commun. Rev."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"23440","DOI":"10.1109\/ACCESS.2020.2970683","article-title":"P4 to FPGA-A Fast Approach for Generating Efficient Network Processors","volume":"8","author":"Cao","year":"2020","journal-title":"IEEE Access"},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"164829","DOI":"10.1109\/ACCESS.2025.3610893","article-title":"P4THLS: A Templated HLS Framework to Automate Efficient Mapping of P4 Data-Plane Applications to FPGAs","volume":"13","author":"Abbasmollaei","year":"2025","journal-title":"IEEE Access"},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"5","DOI":"10.1145\/3139645.3139648","article-title":"The P416 Programming Language","volume":"51","author":"Budiu","year":"2017","journal-title":"ACM SIGOPS Oper. Syst. Rev."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"54373","DOI":"10.1109\/ACCESS.2023.3275756","article-title":"A Survey on P4 Challenges in Software Defined Networks: P4 Programming","volume":"11","author":"Goswami","year":"2023","journal-title":"IEEE Access"},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Jasny, M., Thostrup, L., Ziegler, T., and Binnig, C. (2022, January 12\u201317). P4DB\u2014The Case for In-Network OLTP. Proceedings of the 2022 International Conference on Management of Data, Philadelphia, PA, USA. SIGMOD \u201922.","DOI":"10.1145\/3514221.3517825"},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Castanheira, L., Parizotto, R., and Schaeffer-Filho, A.E. (2019, January 20\u201324). FlowStalker: Comprehensive Traffic Flow Monitoring on the Data Plane using P4. Proceedings of the IEEE International Conference on Communications (ICC), Shanghai, China.","DOI":"10.1109\/ICC.2019.8761197"},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Jin, X., Li, X., Zhang, H., Soul\u00e9, R., Lee, J., Foster, N., Kim, C., and Stoica, I. (2017, January 28). NetCache: Balancing Key-Value Stores with Fast In-Network Caching. Proceedings of the 26th Symposium on Operating Systems Principles, Shanghai, China. SOSP \u201917.","DOI":"10.1145\/3132747.3132764"},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Moro, D., Sanvito, D., and Capone, A. (2020, January 10\u201312). FlowBlaze.p4: A library for quick prototyping of stateful SDN applications in P4. Proceedings of the IEEE Conference on Network Function Virtualization and Software Defined Networks (NFV-SDN), Leganes, Spain.","DOI":"10.1109\/NFV-SDN50289.2020.9289890"},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Tulumello, A. (2021, January 25\u201329). P4 language extensions for stateful packet processing. Proceedings of the International Conference on Network and Service Management (CNSM), Izmir, Turkey.","DOI":"10.23919\/CNSM52442.2021.9615573"},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Lu, R., and Guo, Z. (2023). An FPGA-Based High-Performance Stateful Packet Processing Method. Micromachines, 14.","DOI":"10.3390\/mi14112074"},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Allard, F., Ould-Bachir, T., and Savaria, Y. (2024, January 24\u201328). Enhancing P4 Syntax to Support Extended Finite State Machines as Native Stateful Objects. Proceedings of the 2024 IEEE 10th International Conference on Network Softwarization (NetSoft), Saint Louis, MO, USA.","DOI":"10.1109\/NetSoft60951.2024.10588910"},{"key":"ref_22","unstructured":"Pontarelli, S., Bifulco, R., Bonola, M., Cascone, C., Spaziani, M., Bruschi, V., Sanvito, D., Siracusano, G., Capone, A., and Honda, M. (2019, January 26\u201328). FlowBlaze: Stateful Packet Processing in Hardware. Proceedings of the 16th USENIX Symposium on Networked Systems Design and Implementation (NSDI 19), Boston, MA, USA."},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3696397","article-title":"F3: Fast and Flexible Network Telemetry with an FPGA coprocessor","volume":"2","author":"Feng","year":"2024","journal-title":"Proc. ACM Netw."},{"key":"ref_24","unstructured":"Arai, K. P4-NIDS: High-Performance Network Monitoring and Intrusion Detection in P4. Proceedings of the Intelligent Computing."},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"4176","DOI":"10.1109\/TNSM.2022.3212913","article-title":"MAP4: A Pragmatic Framework for In-Network Machine Learning Traffic Classification","volume":"19","author":"Xavier","year":"2022","journal-title":"IEEE Trans. Netw. Serv. Manag."},{"key":"ref_26","unstructured":"Zeng, C., Luo, L., Zhang, T., Wang, Z., Li, L., Han, W., Chen, N., Wan, L., Liu, L., and Ding, Z. (2022, January 4\u20136). Tiara: A Scalable and Efficient Hardware Acceleration Architecture for Stateful Layer-4 Load Balancing. Proceedings of the USENIX Symposium on Networked Systems Design and Implementation (NSDI 22), Renton, WA, USA."},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Han, Z., Briasco-Stewart, A., Zink, M., and Leeser, M. (2024, January 23\u201327). Extracting TCPIP Headers at High Speed for the Anonymized Network Traffic Graph Challenge. Proceedings of the 2024 IEEE High Performance Extreme Computing Conference (HPEC), Wakefield, MA, USA.","DOI":"10.1109\/HPEC62836.2024.10938446"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Heinanen, D.J., and Guerin, D.R. (1999). A Single Rate Three Color Marker, RFC Editor. RFC 2697.","DOI":"10.17487\/rfc2697"},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Heinanen, D.J., and Guerin, D.R. (1999). A Two Rate Three Color Marker, RFC Editor. RFC 2698.","DOI":"10.17487\/rfc2698"},{"key":"ref_30","unstructured":"Laidig, R., D\u00fcrr, F., Rothermel, K., Wildhagen, S., and Allg\u00f6wer, F. (September, January 30). Dynamic Deterministic Quality of Service Model with Behavior-Adaptive Latency Bounds. Proceedings of the IEEE International Conference on Embedded and Real-Time Computing Systems and Applications (RTCSA), Niigata, Japan."},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Zhang, L., Li, Y., Yang, W., Liu, Q., and Yang, R. (2024, January 8\u201310). PFTB: A Prediction-Based Fair Token Bucket Algorithm based on CRDT. Proceedings of the International Conference on Computer Supported Cooperative Work in Design (CSCWD), Tianjin, China.","DOI":"10.1109\/CSCWD61410.2024.10580549"},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"1885","DOI":"10.1109\/TNET.2020.3002074","article-title":"Design and Implementation of TCP-Friendly Meters in P4 Switches","volume":"28","author":"Wang","year":"2020","journal-title":"IEEE\/ACM Trans. Netw."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"479","DOI":"10.1109\/TNET.2024.3491763","article-title":"An Anatomy of Token-Based Congestion Control","volume":"33","author":"Liu","year":"2025","journal-title":"IEEE Trans. Netw."},{"key":"ref_34","doi-asserted-by":"crossref","unstructured":"Kang, L., Tian, L., and Hu, Y. (2024, January 26\u201328). A Programmable Packet Scheduling Method Based on Traffic Rate. Proceedings of the 2024 IEEE 2nd International Conference on Control, Electronics and Computer Technology (ICCECT), Jilin, China.","DOI":"10.1109\/ICCECT60629.2024.10545661"},{"key":"ref_35","unstructured":"P4.org Applications Working Group (2025, November 01). In-Band Network Telemetry (INT) Dataplane Specification, Ver. 2.1. Available online: https:\/\/p4.org\/wp-content\/uploads\/sites\/53\/p4-spec\/docs\/INT_v2_1.pdf."},{"key":"ref_36","doi-asserted-by":"crossref","first-page":"107763","DOI":"10.1016\/j.comnet.2020.107763","article-title":"In-band Network Telemetry: A Survey","volume":"186","author":"Tan","year":"2021","journal-title":"Comput. Netw."},{"key":"ref_37","doi-asserted-by":"crossref","unstructured":"Sardellitti, S., Polverini, M., Barbarossa, S., Cianfrani, A., Lorenzo, P.D., and Listanti, M. (2023, January 19\u201323). In Band Network Telemetry Overhead Reduction Based on Data Flows Sampling and Recovering. Proceedings of the IEEE International Conference on Network Softwarization (NetSoft), Madrid, Spain.","DOI":"10.1109\/NetSoft57336.2023.10175471"},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"2587","DOI":"10.1109\/TNSM.2021.3069000","article-title":"Highly-Efficient and Adaptive Network Monitoring: When INT Meets Segment Routing","volume":"18","author":"Zheng","year":"2021","journal-title":"IEEE Trans. Netw. Serv. Manag."},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Zhang, Y., Pan, T., Zheng, Y., Song, E., Liu, J., Huang, T., and Liu, Y. (June, January 28). INT-Balance: In-Band Network-Wide Telemetry with Balanced Monitoring Path Planning. Proceedings of the ICC 2023\u2014IEEE International Conference on Communications, Rome, Italy.","DOI":"10.1109\/ICC45041.2023.10279077"},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Bal, S., Han, Z., Handagala, S., Cevik, M., Zink, M., and Leeser, M. (2024, January 20). P4-Based In-Network Telemetry for FPGAs in the Open Cloud Testbed and FABRIC. Proceedings of the IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), Vancouver, BC, Canada.","DOI":"10.1109\/INFOCOMWKSHPS61880.2024.10620664"},{"key":"ref_41","doi-asserted-by":"crossref","unstructured":"Bhamare, D., Kassler, A., Vestin, J., Khoshkholghi, M.A., and Taheri, J. (2019, January 20\u201324). IntOpt: In-Band Network Telemetry Optimization for NFV Service Chain Monitoring. Proceedings of the ICC 2019\u20142019 IEEE International Conference on Communications (ICC), Shanghai, China.","DOI":"10.1109\/ICC.2019.8761722"},{"key":"ref_42","doi-asserted-by":"crossref","first-page":"2315","DOI":"10.1109\/TNET.2024.3351672","article-title":"MTU-Adaptive In-Band Network-Wide Telemetry","volume":"32","author":"Li","year":"2024","journal-title":"IEEE\/ACM Trans. Netw."},{"key":"ref_43","doi-asserted-by":"crossref","first-page":"11","DOI":"10.1145\/3314212.3314215","article-title":"Network telemetry: Towards a top-down approach","volume":"49","author":"Yu","year":"2019","journal-title":"SIGCOMM Comput. Commun. Rev."},{"key":"ref_44","doi-asserted-by":"crossref","first-page":"145227","DOI":"10.1109\/ACCESS.2020.3013770","article-title":"End-to-End Delay Minimization-Based Joint Rule Caching and Flow Forwarding Algorithm for SDN","volume":"8","author":"Luo","year":"2020","journal-title":"IEEE Access"},{"key":"ref_45","doi-asserted-by":"crossref","first-page":"103248","DOI":"10.1016\/j.jnca.2021.103248","article-title":"Flow control oriented forwarding and caching in cache-enabled networks","volume":"196","author":"Wei","year":"2021","journal-title":"J. Netw. Comput. Appl."},{"key":"ref_46","doi-asserted-by":"crossref","first-page":"2295","DOI":"10.1109\/TNSM.2025.3540012","article-title":"Adaptive Traffic Control: OpenFlow-Based Prioritization Strategies for Achieving High Quality of Service in Software-Defined Networking","volume":"22","author":"Chen","year":"2025","journal-title":"IEEE Trans. Netw. Serv. Manag."},{"key":"ref_47","doi-asserted-by":"crossref","unstructured":"Tiwana, P.S., and Singh, J. (2024, January 2\u20133). Enhancing Multimedia Forwarding in Software- Defined Networks: An Optimal Flow Mechanism Approach. Proceedings of the International Conference on Advancement in Computation & Computer Technologies (InCACCT), Gharuan, India.","DOI":"10.1109\/InCACCT61598.2024.10551199"},{"key":"ref_48","unstructured":"P4 Language Consortium (2025, October 01). v1model.p4\u2014Architecture for Simple_Switch, Available online: https:\/\/github.com\/p4lang\/p4c\/blob\/master\/p4include\/v1model.p4."},{"key":"ref_49","unstructured":"(2025, October 01). AMD Vitis Networking P4 User Guide\u2014Target Architecture (UG1308). Available online: https:\/\/docs.xilinx.com\/r\/en-US\/ug1308-vitis-p4-user-guide\/Target-Architecture."},{"key":"ref_50","doi-asserted-by":"crossref","unstructured":"Yang, X., Sun, Z., Li, J., Yan, J., Li, T., Quan, W., Xu, D., and Antichi, G. (2019, January 24\u201325). FAST: Enabling fast software\/hardware prototype for network experimentation. Proceedings of the International Symposium on Quality of Service, Phoenix, AZ, USA. IWQoS \u201919.","DOI":"10.1145\/3326285.3329067"},{"key":"ref_51","doi-asserted-by":"crossref","unstructured":"Ibanez, S., Brebner, G., McKeown, N., and Zilberman, N. (2019, January 24\u201326). The P4->NetFPGA Workflow for Line-Rate Packet Processing. Proceedings of the 2019 ACM\/SIGDA International Symposium on Field-Programmable Gate Arrays, Seaside, CA, USA. FPGA \u201919.","DOI":"10.1145\/3289602.3293924"},{"key":"ref_52","unstructured":"P4 Language Consortium (2025, October 01). P4C: The P4 Compiler, Available online: https:\/\/github.com\/p4lang\/p4c."},{"key":"ref_53","unstructured":"Cisco Systems (2025, October 01). TRex: A Stateful Traffic Generator, Available online: https:\/\/github.com\/cisco-system-traffic-generator\/trex-core."},{"key":"ref_54","doi-asserted-by":"crossref","unstructured":"Abbasmollaei, M., Ould-Bachir, T., and Savaria, Y. (2025). HLSCAM: Fine-Tuned HLS-Based Content Addressable Memory Implementation for Packet Processing on FPGA. Electronics, 14.","DOI":"10.3390\/electronics14091765"}],"container-title":["Future Internet"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1999-5903\/17\/11\/530\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,11,20]],"date-time":"2025-11-20T13:31:03Z","timestamp":1763645463000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1999-5903\/17\/11\/530"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,11,20]]},"references-count":54,"journal-issue":{"issue":"11","published-online":{"date-parts":[[2025,11]]}},"alternative-id":["fi17110530"],"URL":"https:\/\/doi.org\/10.3390\/fi17110530","relation":{},"ISSN":["1999-5903"],"issn-type":[{"type":"electronic","value":"1999-5903"}],"subject":[],"published":{"date-parts":[[2025,11,20]]}}}