lpm: rework lpm lookup + add bulk function