Journal of Network and Computer Applications 171 (2020) 102806 Available online 2 September 2020 1084-8045/© 2020 Elsevier Ltd. All rights reserved. An effcient pipeline processing scheme for programming Protocol-independent Packet Processors Shu Yang a , Lu Bai a , Laizhong Cui a, f, * , Zhongxing Ming a , Yulei Wu b , Shui Yu c , Hongfei Shen d , Yi Pan e a College of Computer Science and Software Engineering, Shenzhen University, PR China b Department of Computer Science of the College of Engineering, Mathematics and Physical Sciences, University of Exeter, United Kingdom c Department of Computer Science, University of Technology Sydney, Australia d China Telecom, PR China e Department of Computer Science, Georgia State University, USA f PengCheng Laboratory, ShenZhen, China A R T I C L E INFO Keywords: Software-defned network(SDN) Openfow Programming protocol-independent packet Processors(P4 program) ABSTRACT OpenFlow is unable to provide customized fow tables, resulting in memory explosions and high switch retire- ment rates. This is the bottleneck for the development of SDN. Recently, P4 (Programming Protocol-independent Packet Processors) attracts much attentions from both academia and industry. It provides customized networking services by offering fow-level control. P4 can producevarious forwarding tables according to packets. P4 increases the speed of custom ASICs. However, with the prevalence of P4, the multiple forwarding tables could explode when used in large scale networks. The explosion problem can slow down the lookup speed, which causes congestions and packet losses. In addition, the pipelined structure of forwarding tables brings additional processing delay. In this study, we will improve the lookup performance by optimizing the forwarding tables of P4. Intuitively, we will install the rules according to their popularity, i.e., the popular rules will appear earlier than others. Thus, the packets can hit the matched rule sooner. In this paper, we formalize the optimization problem, and prove that the problem is NP-hard. To solve the problem, we propose a heuristic algorithm called EPSP (Effcient Pipeline Processing Scheme for P4), which can largely reduce the lookup time while keeping the forwarding actions the same. Because running the optimization algorithm frequently brings additional processing burdens, wedesign an incremental update algorithm to alleviate this problem. To evaluate the proposed algo- rithms, we set up the simulation environments based on ns-3. The simulation results show that the algorithm greatly reduces both the lookup time and the number of memory accesses. The incremental algorithm largely reduces the processing burdens while the lookup time remains almost the same with the non-incremental al- gorithm. We also implemented a prototype using foodlight and mininet. The results show that our algorithm brings acceptable burder, and performs better than traditional algorithm. 1. Introduction Researchers have made tremendous effort to improve the stiff network architecture, and have achieved a better network programming framework (Li et al., 2018; Gao et al., 2018). Recently, P4 (Program- ming Protocol-independent Packet Processors) (Bosshart et al., 2014; Wang et al., 2019) has attracted wide attentions from academia and industry, due to its characteristics of fexibility and protocol-independence. The P4 paper (Bosshart et al., 2014) published by Nick McKeown et al. has attracted wide attentions. McKeown et al. subsequently published the documents such as The P4 Language Spec- ifcation, Barefoot White Paper, etc. ONF has also established an open source project —— PIF(the Protocol Independent Forwarding). The re- sults of the PIF project will be used to design the next generation of OpenFlow protocol. Many studies (Shah et al., 2018; Demirci and Sag- iroglu; Bradai et al., 2015) on protocol-independent forwarding devices This paper is an extendable version of the IEEE LCN 2016 paper (Wu et al., 2016). We made some additional contributions, including: propose an incremental update algorithm, add some experiments, use P4 switch. * Corresponding author. College of Computer Science and Software Engineering, Shenzhen University, PR China. E-mail address: cuilz@szu.edu.cn (L. Cui). Contents lists available at ScienceDirect Journal of Network and Computer Applications journal homepage: www.elsevier.com/locate/jnca https://doi.org/10.1016/j.jnca.2020.102806 Received 4 February 2020; Received in revised form 2 June 2020; Accepted 11 August 2020