From owner-svn-src-head@freebsd.org Thu Mar 3 02:46:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26081AC1A66; Thu, 3 Mar 2016 02:46:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8EE819AA; Thu, 3 Mar 2016 02:46:13 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u232kC2E056433; Thu, 3 Mar 2016 02:46:12 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u232kCbs056430; Thu, 3 Mar 2016 02:46:12 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201603030246.u232kCbs056430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 3 Mar 2016 02:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296335 - in head: cddl/lib/libdtrace share/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2016 02:46:14 -0000 Author: gnn Date: Thu Mar 3 02:46:12 2016 New Revision: 296335 URL: https://svnweb.freebsd.org/changeset/base/296335 Log: fix tcpdebug: - assign to "flags" in each probe, not only debug-input compute "len" in the same way in each probe Submitted by: Hannes Mehnert MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D5524 Modified: head/cddl/lib/libdtrace/tcp.d head/share/dtrace/Makefile head/share/dtrace/tcpdebug Modified: head/cddl/lib/libdtrace/tcp.d ============================================================================== --- head/cddl/lib/libdtrace/tcp.d Thu Mar 3 01:43:36 2016 (r296334) +++ head/cddl/lib/libdtrace/tcp.d Thu Mar 3 02:46:12 2016 (r296335) @@ -102,6 +102,7 @@ typedef struct tcpsinfo { string tcps_raddr; /* remote address, as a string */ int32_t tcps_state; /* TCP state */ uint32_t tcps_iss; /* Initial sequence # sent */ + uint32_t tcps_irs; /* Initial sequence # received */ uint32_t tcps_suna; /* sequence # sent but unacked */ uint32_t tcps_smax; /* highest sequence number sent */ uint32_t tcps_snxt; /* next sequence # to send */ @@ -112,10 +113,12 @@ typedef struct tcpsinfo { uint32_t tcps_swl1; /* window update seg seq number */ uint32_t tcps_swl2; /* window update seg ack number */ uint32_t tcps_rup; /* receive urgent pointer */ + uint32_t tcps_radv; /* advertised window */ uint32_t tcps_rwnd; /* receive window size */ int32_t tcps_rcv_ws; /* receive window scaling */ uint32_t tcps_cwnd; /* congestion window */ uint32_t tcps_cwnd_ssthresh; /* threshold for congestion avoidance */ + uint32_t tcps_srecover; /* for use in NewReno Fast Recovery */ uint32_t tcps_sack_fack; /* SACK sequence # we have acked */ uint32_t tcps_sack_snxt; /* next SACK seq # for retransmission */ uint32_t tcps_rto; /* round-trip timeout, msec */ @@ -123,6 +126,10 @@ typedef struct tcpsinfo { int tcps_retransmit; /* retransmit send event, boolean */ int tcps_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ int tcps_debug; /* socket has SO_DEBUG set */ + int32_t tcps_dupacks; /* consecutive dup acks received */ + uint32_t tcps_rtttime; /* RTT measurement start time */ + uint32_t tcps_rtseq; /* sequence # being timed */ + uint32_t tcps_ts_recent; /* timestamp echo data */ } tcpsinfo_t; /* @@ -192,6 +199,7 @@ translator tcpsinfo_t < struct tcpcb *p inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.ie6_foreign); tcps_state = p == NULL ? -1 : p->t_state; tcps_iss = p == NULL ? 0 : p->iss; + tcps_irs = p == NULL ? 0 : p->irs; tcps_suna = p == NULL ? 0 : p->snd_una; tcps_smax = p == NULL ? 0 : p->snd_max; tcps_snxt = p == NULL ? 0 : p->snd_nxt; @@ -201,11 +209,13 @@ translator tcpsinfo_t < struct tcpcb *p tcps_snd_ws = p == NULL ? -1 : p->snd_scale; tcps_swl1 = p == NULL ? -1 : p->snd_wl1; tcps_swl2 = p == NULL ? -1 : p->snd_wl2; + tcps_radv = p == NULL ? -1 : p->rcv_adv; tcps_rwnd = p == NULL ? -1 : p->rcv_wnd; tcps_rup = p == NULL ? -1 : p->rcv_up; tcps_rcv_ws = p == NULL ? -1 : p->rcv_scale; tcps_cwnd = p == NULL ? -1 : p->snd_cwnd; 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_rto = p == NULL ? -1 : (p->t_rxtcur * 1000) / `hz; @@ -214,6 +224,10 @@ translator tcpsinfo_t < struct tcpcb *p tcps_srtt = p == NULL ? -1 : p->t_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ tcps_debug = p == NULL ? 0 : p->t_inpcb->inp_socket->so_options & 1; + tcps_dupacks = p == NULL ? -1 : p->t_dupacks; + tcps_rtttime = p == NULL ? -1 : p->t_rtttime; + tcps_rtseq = p == NULL ? -1 : p->t_rtseq; + tcps_ts_recent = p == NULL ? -1 : p->ts_recent; }; #pragma D binding "1.6.3" translator Modified: head/share/dtrace/Makefile ============================================================================== --- head/share/dtrace/Makefile Thu Mar 3 01:43:36 2016 (r296334) +++ head/share/dtrace/Makefile Thu Mar 3 02:46:12 2016 (r296335) @@ -20,6 +20,7 @@ SCRIPTS= blocking \ nfsclienttime \ siftr \ tcpconn \ + tcpdebug \ tcpstate \ tcptrack \ udptrack \ Modified: head/share/dtrace/tcpdebug ============================================================================== --- head/share/dtrace/tcpdebug Thu Mar 3 01:43:36 2016 (r296334) +++ head/share/dtrace/tcpdebug Thu Mar 3 02:46:12 2016 (r296335) @@ -83,7 +83,8 @@ tcp:kernel::debug-output { seq = args[1]->tcp_seq; ack = args[1]->tcp_ack; - len = args[2]->ip_plength - 20; + len = args[2]->ip_plength - sizeof(struct tcphdr); + flags = args[1]->tcp_flags; printf("%p %s: output [%x..%x]", arg0, tcp_state_string[args[0]->tcps_state], seq, seq + len); @@ -120,7 +121,8 @@ tcp:kernel::debug-drop seq = args[1]->tcp_seq; ack = args[1]->tcp_ack; - len = args[2]->ip_plength; + len = args[2]->ip_plength - sizeof(struct tcphdr); + flags = args[1]->tcp_flags; printf("%p %s: drop [%x..%x]", arg0, tcp_state_string[args[0]->tcps_state], seq, seq + len);