Skip to content

Commit

Permalink
Bug #679 fix PPS calc for long-running sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
fklassen committed Jan 25, 2022
1 parent 017b7ff commit 5612da6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
06/19/2021 Version 4.4.0-beta1
06/19/2021 Version 4.4.0-beta2
- add a security policy document (#689)
- ability to specify directory of pcap files (#682)
- incorrect PPS rate for long-running sessions (#679)
- option --skipbroadcast not working (#677)
- add feature VLAN Q-in-Q (#625)

Expand Down
2 changes: 1 addition & 1 deletion src/send_packets.c
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ static void calc_sleep_time(tcpreplay_t *ctx, struct timeval *pkt_ts_delta,
if ((pkts_sent < COUNTER_OVERFLOW_RISK))
next_tx_us = (pkts_sent * 1000000) * (60 * 60) / pph;
else
next_tx_us = (pkts_sent * 1000000) / pph / (60 * 60);
next_tx_us = ((pkts_sent * 1000000) / pph) * (60 * 60);

if (next_tx_us > tx_us)
NANOSEC_TO_TIMESPEC((next_tx_us - tx_us) * 1000, &ctx->nap);
Expand Down

0 comments on commit 5612da6

Please sign in to comment.