svn commit: r357858 - in head: cddl/lib/libdtrace sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Thu Feb 13 15:14:48 UTC 2020
Author: tuexen
Date: Thu Feb 13 15:14:46 2020
New Revision: 357858
URL: https://svnweb.freebsd.org/changeset/base/357858
Log:
sack_newdata and snd_recover hold the same value. Therefore, use only
a single instance: use snd_recover also where sack_newdata was used.
Submitted by: Richard Scheffenegger
Differential Revision: https://reviews.freebsd.org/D18811
Modified:
head/cddl/lib/libdtrace/tcp.d
head/sys/netinet/tcp_input.c
head/sys/netinet/tcp_log_buf.c
head/sys/netinet/tcp_log_buf.h
head/sys/netinet/tcp_output.c
head/sys/netinet/tcp_sack.c
head/sys/netinet/tcp_usrreq.c
head/sys/netinet/tcp_var.h
Modified: head/cddl/lib/libdtrace/tcp.d
==============================================================================
--- head/cddl/lib/libdtrace/tcp.d Thu Feb 13 14:09:09 2020 (r357857)
+++ head/cddl/lib/libdtrace/tcp.d Thu Feb 13 15:14:46 2020 (r357858)
@@ -244,7 +244,7 @@ translator tcpsinfo_t < struct tcpcb *p > {
tcps_cwnd_ssthresh = p == NULL ? -1 : p->snd_ssthresh;
tcps_srecover = p == NULL ? -1 : p->snd_recover;
tcps_sack_fack = p == NULL ? 0 : p->snd_fack;
- tcps_sack_snxt = p == NULL ? 0 : p->sack_newdata;
+ tcps_sack_snxt = p == NULL ? 0 : p->snd_recover;
tcps_rto = p == NULL ? -1 : (p->t_rxtcur * 1000) / `hz;
tcps_mss = p == NULL ? -1 : p->t_maxseg;
tcps_retransmit = p == NULL ? -1 : p->t_rxtshift > 0 ? 1 : 0;
Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c Thu Feb 13 14:09:09 2020 (r357857)
+++ head/sys/netinet/tcp_input.c Thu Feb 13 15:14:46 2020 (r357858)
@@ -2564,7 +2564,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
if (tp->t_flags & TF_SACK_PERMIT) {
TCPSTAT_INC(
tcps_sack_recovery_episode);
- tp->sack_newdata = tp->snd_nxt;
+ tp->snd_recover = tp->snd_nxt;
tp->snd_cwnd = maxseg;
(void) tp->t_fb->tfb_tcp_output(tp);
goto drop;
Modified: head/sys/netinet/tcp_log_buf.c
==============================================================================
--- head/sys/netinet/tcp_log_buf.c Thu Feb 13 14:09:09 2020 (r357857)
+++ head/sys/netinet/tcp_log_buf.c Thu Feb 13 15:14:46 2020 (r357858)
@@ -1686,7 +1686,6 @@ retry:
COPY_STAT(rcv_up);
COPY_STAT(rcv_adv);
COPY_STAT(rcv_nxt);
- COPY_STAT(sack_newdata);
COPY_STAT(rcv_wnd);
COPY_STAT_T(dupacks);
COPY_STAT_T(segqlen);
Modified: head/sys/netinet/tcp_log_buf.h
==============================================================================
--- head/sys/netinet/tcp_log_buf.h Thu Feb 13 14:09:09 2020 (r357857)
+++ head/sys/netinet/tcp_log_buf.h Thu Feb 13 15:14:46 2020 (r357858)
@@ -32,7 +32,7 @@
#define TCP_LOG_REASON_LEN 32
#define TCP_LOG_TAG_LEN 32
-#define TCP_LOG_BUF_VER (7)
+#define TCP_LOG_BUF_VER (8)
/*
* Because the (struct tcp_log_buffer) includes 8-byte uint64_t's, it requires
@@ -144,7 +144,6 @@ struct tcp_log_buffer
uint32_t tlb_rcv_up; /* TCPCB rcv_up */
uint32_t tlb_rcv_adv; /* TCPCB rcv_adv */
uint32_t tlb_rcv_nxt; /* TCPCB rcv_nxt */
- tcp_seq tlb_sack_newdata; /* TCPCB sack_newdata */
uint32_t tlb_rcv_wnd; /* TCPCB rcv_wnd */
uint32_t tlb_dupacks; /* TCPCB t_dupacks */
int tlb_segqlen; /* TCPCB segqlen */
Modified: head/sys/netinet/tcp_output.c
==============================================================================
--- head/sys/netinet/tcp_output.c Thu Feb 13 14:09:09 2020 (r357857)
+++ head/sys/netinet/tcp_output.c Thu Feb 13 15:14:46 2020 (r357858)
@@ -420,7 +420,7 @@ after_sack_rexmit:
*/
if (len > 0) {
cwin = tp->snd_cwnd -
- (tp->snd_nxt - tp->sack_newdata) -
+ (tp->snd_nxt - tp->snd_recover) -
sack_bytes_rxmt;
if (cwin < 0)
cwin = 0;
Modified: head/sys/netinet/tcp_sack.c
==============================================================================
--- head/sys/netinet/tcp_sack.c Thu Feb 13 14:09:09 2020 (r357857)
+++ head/sys/netinet/tcp_sack.c Thu Feb 13 15:14:46 2020 (r357858)
@@ -780,7 +780,7 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *t
if ((BYTES_THIS_ACK(tp, th) / tp->t_maxseg) >= 2)
num_segs = 2;
tp->snd_cwnd = (tp->sackhint.sack_bytes_rexmit +
- (tp->snd_nxt - tp->sack_newdata) + num_segs * tp->t_maxseg);
+ (tp->snd_nxt - tp->snd_recover) + num_segs * tp->t_maxseg);
if (tp->snd_cwnd > tp->snd_ssthresh)
tp->snd_cwnd = tp->snd_ssthresh;
tp->t_flags |= TF_ACKNOW;
Modified: head/sys/netinet/tcp_usrreq.c
==============================================================================
--- head/sys/netinet/tcp_usrreq.c Thu Feb 13 14:09:09 2020 (r357857)
+++ head/sys/netinet/tcp_usrreq.c Thu Feb 13 15:14:46 2020 (r357858)
@@ -2806,8 +2806,8 @@ db_print_tcpcb(struct tcpcb *tp, const char *name, int
tp->snd_numholes, TAILQ_FIRST(&tp->snd_holes));
db_print_indent(indent);
- db_printf("snd_fack: 0x%08x rcv_numsacks: %d sack_newdata: "
- "0x%08x\n", tp->snd_fack, tp->rcv_numsacks, tp->sack_newdata);
+ db_printf("snd_fack: 0x%08x rcv_numsacks: %d\n",
+ tp->snd_fack, tp->rcv_numsacks);
/* Skip sackblks, sackhint. */
Modified: head/sys/netinet/tcp_var.h
==============================================================================
--- head/sys/netinet/tcp_var.h Thu Feb 13 14:09:09 2020 (r357857)
+++ head/sys/netinet/tcp_var.h Thu Feb 13 15:14:46 2020 (r357858)
@@ -186,8 +186,6 @@ struct tcpcb {
TAILQ_HEAD(sackhole_head, sackhole) snd_holes;
/* SACK scoreboard (sorted) */
tcp_seq snd_fack; /* last seq number(+1) sack'd by rcv'r*/
- tcp_seq sack_newdata; /* New data xmitted in this recovery
- episode starts at this seq number */
struct sackblk sackblks[MAX_SACK_BLKS]; /* seq nos. of sack blocks */
struct sackhint sackhint; /* SACK scoreboard hint */
int t_rttlow; /* smallest observerved RTT */
More information about the svn-src-all
mailing list