currently I am doing some Measurements (using iperf3, TCP-Tracepoints (for monitoring the Congestion-Window (CWND)) and tcpdump). While altering the TCP-Window (RWND) Field (using a nf-hook kernel Module), I noticed a mismatch between the congestion-window-value and the receive-window-value. See Graph of CWND and RWND
(Here you can clearly see that the CWND is capped by the RWND but that the values are not in the correct units / values)
[Server] -- Data --> [Client] [Server] <-- Acks -- [Client] (Server keeps a Congestion Window (via the Cubic algorithm)) (Client includes the manually controlled receive-window in the ACKs (using the 'Window'-Field in the TCP-Header)) (The Receive-Window is set to increase every 5 seconds (as seen in the Graph above)) The Graph is from the Server-Side and displays the CWND (Red) (Seen via the tcp_probe tracepoint) and the RWND (Blue) (Seen via the incomming ACKs in Wireshark). The RWND is converted to MSS Units by using the tcp.window_size (this value is already scaled by the scale-factor) (Image of RWND in Wireshark) and dividing it by the MSS of the stream (1460 Bytes for both sides in this measurement) (See Wireshark Capture of MSS).
This results in a simple Formula of tcp.window_size / MSS
My understanding is that that should bring both values to the same Unit and that the CWND in the Graph should now be capped by the RWND but this isn't the case (Because in the Graph the CWND is bigger than the RWND)
Does anyone have any Idea why this is? Am I doing any calculations wrong or do I have some units mixed up?
Any Help would be greatly appreciated :D