free5gc / upf

Apache License 2.0
32 stars 51 forks source link

refactor PacketInGTPUHandle (computed goto) #48

Closed ianchen0119 closed 2 years ago

ianchen0119 commented 2 years ago

Considering to the bottleneck of UPF is user data packet processing, I think using computed goto to replace switch-case can bring more performance on branch prediction. In the case of many users sending the data packet to UPF, computed goto can prevent the wrong branch prediction (it will cause the pipeline to be cleared).

Reference