Intelligent packet flow