I have a strong confusion on this whether LPM is done in Data or Control Plane. My thoughts on this is as follows if its in data plane, we will have to do it for every packet hence we will have a reduced speed for forwarding. What I believe is that we can do everything in control plane and program the hardware after adding an identifier for the flow. Then on we need to just look at the flow identifier and forward the traffic without further lookup.
Is my idea correct ?