Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_output.c
Show First 20 Lines • Show All 585 Lines • ▼ Show 20 Lines | #endif | ||||
* - we have more then 1/2 the maximum send window's worth of | * - we have more then 1/2 the maximum send window's worth of | ||||
* data (receiver may be limited the window size) | * data (receiver may be limited the window size) | ||||
* - we need to retransmit | * - we need to retransmit | ||||
*/ | */ | ||||
if (len) { | if (len) { | ||||
if (len >= tp->t_maxseg) | if (len >= tp->t_maxseg) | ||||
goto send; | goto send; | ||||
/* | /* | ||||
* As the TCP header options are now | |||||
* considered when setting up the initial | |||||
* window, we would not send the last segment | |||||
* if we skip considering the option length here. | |||||
* Note: this may not work when tcp headers change | |||||
* very dynamically in the future. | |||||
*/ | |||||
if ((((tp->t_flags & TF_SIGNATURE) ? | |||||
PADTCPOLEN(TCPOLEN_SIGNATURE) : 0) + | |||||
((tp->t_flags & TF_RCVD_TSTMP) ? | |||||
PADTCPOLEN(TCPOLEN_TIMESTAMP) : 0) + | |||||
len) >= tp->t_maxseg) | |||||
goto send; | |||||
/* | |||||
* NOTE! on localhost connections an 'ack' from the remote | * NOTE! on localhost connections an 'ack' from the remote | ||||
* end may occur synchronously with the output and cause | * end may occur synchronously with the output and cause | ||||
* us to flush a buffer queued with moretocome. XXX | * us to flush a buffer queued with moretocome. XXX | ||||
* | * | ||||
* note: the len + off check is almost certainly unnecessary. | * note: the len + off check is almost certainly unnecessary. | ||||
*/ | */ | ||||
if (!(tp->t_flags & TF_MORETOCOME) && /* normal case */ | if (!(tp->t_flags & TF_MORETOCOME) && /* normal case */ | ||||
(idle || (tp->t_flags & TF_NODELAY)) && | (idle || (tp->t_flags & TF_NODELAY)) && | ||||
▲ Show 20 Lines • Show All 1,507 Lines • Show Last 20 Lines |