An efficient packet parser architecture for software-defined 5G networks