Replace t_force with a t_flag (TF_FORCEDATA).
Submitted by: Raja Mukerji. Reviewed by: Mohan, Silby, Andre Opperman.
This commit is contained in:
parent
bd8fa19da3
commit
2cdbfa66ee
@ -257,7 +257,7 @@ tcp_output(struct tcpcb *tp)
|
||||
* and timer expired, we will send what we can
|
||||
* and go to transmit state.
|
||||
*/
|
||||
if (tp->t_force) {
|
||||
if (tp->t_flags & TF_FORCEDATA) {
|
||||
if (sendwin == 0) {
|
||||
/*
|
||||
* If we still have some data to send, then
|
||||
@ -419,7 +419,7 @@ tcp_output(struct tcpcb *tp)
|
||||
(tp->t_flags & TF_NOPUSH) == 0) {
|
||||
goto send;
|
||||
}
|
||||
if (tp->t_force) /* typ. timeout case */
|
||||
if (tp->t_flags & TF_FORCEDATA) /* typ. timeout case */
|
||||
goto send;
|
||||
if (len >= tp->max_sndwnd / 2 && tp->max_sndwnd > 0)
|
||||
goto send;
|
||||
@ -492,7 +492,7 @@ tcp_output(struct tcpcb *tp)
|
||||
*
|
||||
* callout_active(tp->tt_persist)
|
||||
* is true when we are in persist state.
|
||||
* tp->t_force
|
||||
* (tp->t_flags & TF_FORCEDATA)
|
||||
* is set when we are called to send a persist packet.
|
||||
* callout_active(tp->tt_rexmt)
|
||||
* is set when we are retransmitting
|
||||
@ -725,7 +725,7 @@ tcp_output(struct tcpcb *tp)
|
||||
* the template for sends on this connection.
|
||||
*/
|
||||
if (len) {
|
||||
if (tp->t_force && len == 1)
|
||||
if ((tp->t_flags & TF_FORCEDATA) && len == 1)
|
||||
tcpstat.tcps_sndprobe++;
|
||||
else if (SEQ_LT(tp->snd_nxt, tp->snd_max)) {
|
||||
tcpstat.tcps_sndrexmitpack++;
|
||||
@ -948,7 +948,8 @@ tcp_output(struct tcpcb *tp)
|
||||
* In transmit state, time the transmission and arrange for
|
||||
* the retransmit. In persist state, just set snd_max.
|
||||
*/
|
||||
if (tp->t_force == 0 || !callout_active(tp->tt_persist)) {
|
||||
if ((tp->t_flags & TF_FORCEDATA) == 0 ||
|
||||
!callout_active(tp->tt_persist)) {
|
||||
tcp_seq startseq = tp->snd_nxt;
|
||||
|
||||
/*
|
||||
@ -1086,7 +1087,8 @@ tcp_output(struct tcpcb *tp)
|
||||
* We know that the packet was lost, so back out the
|
||||
* sequence number advance, if any.
|
||||
*/
|
||||
if (tp->t_force == 0 || !callout_active(tp->tt_persist)) {
|
||||
if ((tp->t_flags & TF_FORCEDATA) == 0 ||
|
||||
!callout_active(tp->tt_persist)) {
|
||||
/*
|
||||
* No need to check for TH_FIN here because
|
||||
* the TF_SENTFIN flag handles that case.
|
||||
|
@ -436,9 +436,9 @@ tcp_timer_persist(xtp)
|
||||
goto out;
|
||||
}
|
||||
tcp_setpersist(tp);
|
||||
tp->t_force = 1;
|
||||
tp->t_flags |= TF_FORCEDATA;
|
||||
(void) tcp_output(tp);
|
||||
tp->t_force = 0;
|
||||
tp->t_flags &= ~TF_FORCEDATA;
|
||||
|
||||
out:
|
||||
#ifdef TCPDEBUG
|
||||
|
@ -742,9 +742,9 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m,
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
unlocked = 1;
|
||||
tp->snd_up = tp->snd_una + so->so_snd.sb_cc;
|
||||
tp->t_force = 1;
|
||||
tp->t_flags |= TF_FORCEDATA;
|
||||
error = tcp_output(tp);
|
||||
tp->t_force = 0;
|
||||
tp->t_flags &= ~TF_FORCEDATA;
|
||||
}
|
||||
out:
|
||||
TCPDEBUG2((flags & PRUS_OOB) ? PRU_SENDOOB :
|
||||
|
@ -113,7 +113,7 @@ struct tcpcb {
|
||||
#define TF_FASTRECOVERY 0x100000 /* in NewReno Fast Recovery */
|
||||
#define TF_WASFRECOVERY 0x200000 /* was in NewReno Fast Recovery */
|
||||
#define TF_SIGNATURE 0x400000 /* require MD5 digests (RFC2385) */
|
||||
int t_force; /* 1 if forcing out a byte */
|
||||
#define TF_FORCEDATA 0x800000 /* force out a byte */
|
||||
|
||||
tcp_seq snd_una; /* send unacknowledged */
|
||||
tcp_seq snd_max; /* highest sequence number sent;
|
||||
|
Loading…
Reference in New Issue
Block a user