Make max packets per iteration configurable