aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Saab <ps@FreeBSD.org>2005-05-21 00:38:29 +0000
committerPaul Saab <ps@FreeBSD.org>2005-05-21 00:38:29 +0000
commit2cdbfa66ee9fb0e288ad9fa249b07cddcb6092c0 (patch)
tree0651896cf5d44a0afda4705e762705703d6e9ba8
parentbd8fa19da3bddb4e79cd6b4cd9330537c6ffbad1 (diff)
downloadsrc-2cdbfa66ee9fb0e288ad9fa249b07cddcb6092c0.tar.gz
src-2cdbfa66ee9fb0e288ad9fa249b07cddcb6092c0.zip
Replace t_force with a t_flag (TF_FORCEDATA).
Submitted by: Raja Mukerji. Reviewed by: Mohan, Silby, Andre Opperman.
Notes
Notes: svn path=/head/; revision=146463
-rw-r--r--sys/netinet/tcp_output.c14
-rw-r--r--sys/netinet/tcp_timer.c4
-rw-r--r--sys/netinet/tcp_usrreq.c4
-rw-r--r--sys/netinet/tcp_var.h2
4 files changed, 13 insertions, 11 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 783a00f002ff..6bfaa413def6 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -257,7 +257,7 @@ after_sack_rexmit:
* 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 @@ after_sack_rexmit:
(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 @@ after_sack_rexmit:
*
* 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 @@ send:
* 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 @@ send:
* 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 @@ timer:
* 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.
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index e2b9f190b4d8..03f79c79b320 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -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
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 98eff0733f83..3a2dbf5f2ead 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -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 :
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 0d7485fbbb36..0d777ee7a94b 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -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;