Examples of Timestamp Processing
[The TCP chimney offload feature is deprecated and should not be used.]
The following table provides an example of timestamp processing. This processing is synchronized between the host stack and an offload target.
Stack time | Stack delta | Stack processing | NIC time | NIC delta | NIC processing |
---|---|---|---|---|---|
100 |
0 |
Send packet: Timestamp= 100 + 0 |
200 |
0 |
|
Offload connection: TsTime= 100 |
-100 |
NicDelta= 100 - 200 |
|||
105 |
205 |
ACK received: TsEchoed= 100 |
|||
MRTT = (205 - 100 - 100) |
|||||
110 |
210 |
-100 |
Send packet: Timestamp= 210 -100 |
||
115 |
215 |
ACK received: TsEchoed= 110 |
|||
MRTT = (215 - 100 - 110) |
|||||
150 |
250 |
-100 |
Send packet: Timestamp= 250 - 100 |
||
Terminate offload of connection: TsTime= 250 - 100 |
|||||
0 |
StackDelta= 150 - 150 |
||||
155 |
ACK received: TsEchoed= 150 |
255 |
|||
MRTT = (155 + 0 - 150) |
-100 |
The host stack generates a timestamp of 100 for a TCP segment and then sends the segment.
The host stack offloads the TCP connection to the offload target ( TsTime= 100).
The offload target calculates its timestamp delta( NicDelta= 100 - 200 = -100).
The offload target receives an acknowledgement from the remote TCP peer for the packet that was transmitted by the host stack before the connection was offloaded ( TsEchoed= 100).
The offload target calculates the MRTT by using the echoed timestamp (MRTT = 205 - 100 - 100 = 5).
The offload target generates a timestamp of 110 for a TCP segment ( Timestamp= 210 -100) and then sends the segment.
The offload target receives an acknowledgement from the remote TCP peer for the transmitted packet ( TsEchoed= 110).
The offload target calculates the MRTT by using the echoed timestamp (MRTT = 215 - 100 - 110 = 5).
The offload target generates a timestamp of 150 for a TCP segment ( Timestamp= 210 -100) and then sends the segment.
The offload target terminates the offload of the TCP connection ( TsTime= 250 - 100).
The host calculates its timestamp delta ( StackDelta= (250 - 100) - 150 = 0).
The host stack receives an acknowledgement from the remote TCP peer for the packet that was transmitted by the host stack before the offload of the connection was terminated ( TsEchoed= 150).
The offload target calculates the MRTT by using the echoed timestamp (MRTT = 155 + 0 - 150 = 5).
The following table provides an example of timestamp processing that handles drift in the host stack's clock.
Stack time | Stack delta | Stack processing | NIC time | NIC delta | NIC processing |
---|---|---|---|---|---|
100 |
0 |
Send packet: Timestamp= 100 + 0 |
200 |
0 |
|
Offload connection: Timestamp= 100 + 0 |
-100 |
NicDelta= 100 - 200 |
|||
105 |
205 |
ACK received: TsEchoed= 100 |
|||
MRTT = (205 - 100 - 100) |
|||||
200 (clock drift) |
250 |
-100 | Send packet: Timestamp= 250 - 100 |
||
Terminate offload of connection: TsTime= 250 - 100 |
|||||
-50 |
StackDelta= 150 - 200 |
||||
205 |
ACK received: TsEchoed= 150 |
255 |
|||
MRTT = (205 - 50 - 150) |
|||||
250 |
-50 |
Send packet: Timestamp= 250 - 50 |
300 |
||
255 |
ACK received: TsEchoed= 200 |
305 |
|||
MRTT = (255 - 50 - 200) |
|||||
400 (clock drift) |
Send packet: Timestamp= 400 - 50 |
320 |
|||
Offload connection: TsTime= 400 - 50 |
30 |
NicDelta= 350 - 320 |
|||
405 |
325 |
ACK received: TsEchoed= 35050 |
|||
MRTT = (325 + 30 - 350) |
Note the drift in the host stack clock changes from 105 to 200 and from 255 to 400. (Without the drift, these intervals would be 105 to 205 and 320 to 420.) The calculations for the generation of TsTime, the timestamp delta, and the MRTT properly handle this drift.