Address two incorrect calculations and enhance readability of PRR code
authorRichard Scheffenegger <rscheff@FreeBSD.org>
Thu, 25 Feb 2021 16:59:45 +0000 (17:59 +0100)
committerRichard Scheffenegger <rscheff@FreeBSD.org>
Thu, 25 Feb 2021 17:32:04 +0000 (18:32 +0100)
commit48396dc77922c68377ecac0ead2f8b0b5453c451
tree9ef619b4fe1cf5fde950beb4ca7801e70a5e6bcc
parent8f3c71c85e5f6a4d2bddbfead225d33b96dbd7d7
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
sys/netinet/tcp_input.c