TCP window, what did they originally intend?
Posted: Tue Aug 21, 2018 3:52 pm
I have hard times understanding what the TCP really represent and what they originally intended.
First which buffer do they intend here? We have transient buffers inside the network stack (similar to Linux sk_buff) whose are then are assembled and should be delivered to the user. The user process have a buffer where the received data should be assembled. So the question what the TCP window represent, it is the amount of total headroom of the entire stack + user buffer or only the user buffer?
When it comes to the user buffer it actually becomes hard to actually calculate the window depending on the type of system. My system is very asynchronous where received data is pushed to the user process and the data ends up in a buffer allocated from a dedicated buffer. With ring buffers calculating the remaining capacity is simple but isn't used here because of the inconvenience of the wrapping. The buffers are allocated with extra meta data and alignment so depending on how many packets and their sizes it becomes impossible to calculate how much buffer space is reaming. Also fragmentation can lead to that suddenly there isn't enough space for a large data so suddenly the TCP window can change.
What did they originally intend for this TCP window?
What is a good strategy for buffering which makes it easy to calculate the TCP window?
First which buffer do they intend here? We have transient buffers inside the network stack (similar to Linux sk_buff) whose are then are assembled and should be delivered to the user. The user process have a buffer where the received data should be assembled. So the question what the TCP window represent, it is the amount of total headroom of the entire stack + user buffer or only the user buffer?
When it comes to the user buffer it actually becomes hard to actually calculate the window depending on the type of system. My system is very asynchronous where received data is pushed to the user process and the data ends up in a buffer allocated from a dedicated buffer. With ring buffers calculating the remaining capacity is simple but isn't used here because of the inconvenience of the wrapping. The buffers are allocated with extra meta data and alignment so depending on how many packets and their sizes it becomes impossible to calculate how much buffer space is reaming. Also fragmentation can lead to that suddenly there isn't enough space for a large data so suddenly the TCP window can change.
What did they originally intend for this TCP window?
What is a good strategy for buffering which makes it easy to calculate the TCP window?