+ else if (unformat (input, "packets-per-drop %d", &packets_per_drop))
+ {
+ if (packets_per_drop > 0)
+ drop_fraction = 1.0 / ((f64) packets_per_drop);
+ }
+ else if (unformat (input, "drop-fraction %f", &drop_fraction))
+ {
+ if (drop_fraction < 0.0 || drop_fraction > 1.0)
+ return clib_error_return
+ (0, "drop fraction must be between zero and 1");
+ }