The setting net.ipv4.tcp_comp_sack_nr=44 that you're referring to seems to be about a mechanism for compressing TCP Selective Acknowledgment (SACK) options. The TCP SACK mechanism allows a receiver to inform the sender about all the segments that have been received successfully, thereby allowing for more efficient retransmissions of lost data. The idea behind compressing SACK blocks is to optimize the usage of the limited space available for options in the TCP header, thus enabling the acknowledgment of more blocks within a single TCP segment.
The conventional operation of SACK does not include a standardized method for "compressing" SACK blocks as implied by the reference to a specific net.ipv4.tcp_comp_sack_nr setting. This setting might be part of a specific kernel patch, a custom implementation, or a misunderstanding. As of my last knowledge update in April 2023, the standard Linux Kernel or TCP RFCs do not include a parameter named net.ipv4.tcp_comp_sack_nr.
However, regarding your question about whether a SACK block can be sent to the sender before its compression, here are some considerations based on the general mechanism of TCP and SACKs:
-
TCP SACK Mechanism: When a packet is lost, and packets after the lost one are received, the receiver can use the SACK option to inform the sender about the received packets, skipping the lost ones. This allows the sender to retransmit only the lost packets.
-
Transmission Before Compression: In the context of a theoretical or custom implementation where SACK blocks could be compressed, the compression would likely be intended to optimize the transmission of multiple blocks. If such a mechanism exists, the point of compression would be to minimize the header size before sending SACK information back to the sender. Therefore, if a SACK block is ready to be sent, it would either be sent uncompressed (if the mechanism allowed for immediate transmission without waiting for more blocks) or it would wait until it can be compressed with others for more efficient transmission.
-
Efficiency and Practicality: The efficiency of sending SACK blocks back to the sender without waiting for potential compression would depend on factors like the urgency of the acknowledgment (to recover from loss quickly) versus the benefit of compressing multiple acknowledgments into a smaller packet size. The decision would likely be based on a trade-off between speed and efficiency.
-
Custom Implementations and Patches: If there are custom patches or experimental TCP features being employed, the behavior might differ from standard TCP/IP stack implementations. In such cases, the specifics would depend on how the feature was designed and implemented.
In summary, without a standard or widely recognized implementation of SACK block compression under the described parameter, the scenario you're asking about remains theoretical. However, based on conventional TCP/IP operations, any mechanism designed to compress acknowledgment information would need to balance immediacy and efficiency to optimize network performance.