HomeFreeBSD

Address two incorrect calculations and enhance readability of PRR code

Description

Address two incorrect calculations and enhance readability of PRR code

  • address second instance of cwnd potentially becoming zero
  • fix sublte bug due to implicit int to uint typecase in max()
  • fix bug due to typo in hand-coded CEILING() function by using howmany() macro
  • use int instead of long, and add a missing long typecast
  • replace if conditionals with easier to read imax/imin (as in pseudocode)

Reviewed By: transport, kbowling
MFC after: 3 days
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D28813

(cherry picked from commit 48396dc77922c68377ecac0ead2f8b0b5453c451)

Details

Provenance
rscheffAuthored on Feb 25 2021, 4:59 PM
Reviewer
transport
Differential Revision
D28813: Address two incorrect calculations and enhance readability of PRR code
Parents
rG32ed0ef06b83: PRR: use accurate rfc6675_pipe when enabled
Branches
Unknown
Tags
Unknown