net/mvpp2: move common functions to common location