tcp_output.c (215166) | tcp_output.c (215434) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)tcp_output.c 8.4 (Berkeley) 5/24/95 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)tcp_output.c 8.4 (Berkeley) 5/24/95 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet/tcp_output.c 215166 2010-11-12 06:41:55Z lstewart $"); | 33__FBSDID("$FreeBSD: head/sys/netinet/tcp_output.c 215434 2010-11-17 18:55:12Z gnn $"); |
34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37#include "opt_ipsec.h" 38#include "opt_tcpdebug.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> --- 756 unchanged lines hidden (view full) --- 798 */ 799 if (len) { 800 struct mbuf *mb; 801 u_int moff; 802 803 if ((tp->t_flags & TF_FORCEDATA) && len == 1) 804 TCPSTAT_INC(tcps_sndprobe); 805 else if (SEQ_LT(tp->snd_nxt, tp->snd_max) || sack_rxmit) { | 34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37#include "opt_ipsec.h" 38#include "opt_tcpdebug.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> --- 756 unchanged lines hidden (view full) --- 798 */ 799 if (len) { 800 struct mbuf *mb; 801 u_int moff; 802 803 if ((tp->t_flags & TF_FORCEDATA) && len == 1) 804 TCPSTAT_INC(tcps_sndprobe); 805 else if (SEQ_LT(tp->snd_nxt, tp->snd_max) || sack_rxmit) { |
806 tp->t_sndrexmitpack++; |
|
806 TCPSTAT_INC(tcps_sndrexmitpack); 807 TCPSTAT_ADD(tcps_sndrexmitbyte, len); 808 } else { 809 TCPSTAT_INC(tcps_sndpack); 810 TCPSTAT_ADD(tcps_sndbyte, len); 811 } 812#ifdef notyet 813 if ((m = m_copypack(so->so_snd.sb_mb, off, --- 208 unchanged lines hidden (view full) --- 1022 /* 1023 * Adjust the RXWIN0SENT flag - indicate that we have advertised 1024 * a 0 window. This may cause the remote transmitter to stall. This 1025 * flag tells soreceive() to disable delayed acknowledgements when 1026 * draining the buffer. This can occur if the receiver is attempting 1027 * to read more data than can be buffered prior to transmitting on 1028 * the connection. 1029 */ | 807 TCPSTAT_INC(tcps_sndrexmitpack); 808 TCPSTAT_ADD(tcps_sndrexmitbyte, len); 809 } else { 810 TCPSTAT_INC(tcps_sndpack); 811 TCPSTAT_ADD(tcps_sndbyte, len); 812 } 813#ifdef notyet 814 if ((m = m_copypack(so->so_snd.sb_mb, off, --- 208 unchanged lines hidden (view full) --- 1023 /* 1024 * Adjust the RXWIN0SENT flag - indicate that we have advertised 1025 * a 0 window. This may cause the remote transmitter to stall. This 1026 * flag tells soreceive() to disable delayed acknowledgements when 1027 * draining the buffer. This can occur if the receiver is attempting 1028 * to read more data than can be buffered prior to transmitting on 1029 * the connection. 1030 */ |
1030 if (th->th_win == 0) | 1031 if (th->th_win == 0) { 1032 tp->t_sndzerowin++; |
1031 tp->t_flags |= TF_RXWIN0SENT; | 1033 tp->t_flags |= TF_RXWIN0SENT; |
1032 else | 1034 } else |
1033 tp->t_flags &= ~TF_RXWIN0SENT; 1034 if (SEQ_GT(tp->snd_up, tp->snd_nxt)) { 1035 th->th_urp = htons((u_short)(tp->snd_up - tp->snd_nxt)); 1036 th->th_flags |= TH_URG; 1037 } else 1038 /* 1039 * If no urgent pointer to send, then we pull 1040 * the urgent pointer to the left edge of the send window --- 466 unchanged lines hidden --- | 1035 tp->t_flags &= ~TF_RXWIN0SENT; 1036 if (SEQ_GT(tp->snd_up, tp->snd_nxt)) { 1037 th->th_urp = htons((u_short)(tp->snd_up - tp->snd_nxt)); 1038 th->th_flags |= TH_URG; 1039 } else 1040 /* 1041 * If no urgent pointer to send, then we pull 1042 * the urgent pointer to the left edge of the send window --- 466 unchanged lines hidden --- |