]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
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>
Sun, 28 Feb 2021 08:07:54 +0000 (09:07 +0100)
commitffbf1b809ef5080afa130c11fa4afce9fef7e7fe
tree9641e8f9537908d5f7d3b473b6e7299bf1ccc8e2
parent32ed0ef06b8326271c4665406cac81fa47d0d29c
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)
sys/netinet/tcp_input.c