summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2005-05-21 00:38:29 +0000
committerps <ps@FreeBSD.org>2005-05-21 00:38:29 +0000
commit8c89591e0a9e12622bf72f59fdd8e37176fa34fe (patch)
tree0651896cf5d44a0afda4705e762705703d6e9ba8 /sys
parent08a22d34e7aa37e9c9e3d4f093841bced0b16326 (diff)
downloadFreeBSD-src-8c89591e0a9e12622bf72f59fdd8e37176fa34fe.zip
FreeBSD-src-8c89591e0a9e12622bf72f59fdd8e37176fa34fe.tar.gz
Replace t_force with a t_flag (TF_FORCEDATA).
Submitted by: Raja Mukerji. Reviewed by: Mohan, Silby, Andre Opperman.
Diffstat (limited to 'sys')
-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 783a00f..6bfaa41 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 e2b9f19..03f79c7 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 98eff07..3a2dbf5 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 0d7485f..0d777ee 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;
OpenPOWER on IntegriCloud