From owner-svn-src-stable-7@FreeBSD.ORG Tue Jan 5 17:04:40 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60AB610657C6; Tue, 5 Jan 2010 17:04:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7798FC0C; Tue, 5 Jan 2010 17:04:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o05H4deD058258; Tue, 5 Jan 2010 17:04:39 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05H4dPn058254; Tue, 5 Jan 2010 17:04:39 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001051704.o05H4dPn058254@svn.freebsd.org> From: John Baldwin Date: Tue, 5 Jan 2010 17:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201594 - in stable/7/sys: dev/cxgb/ulp/iw_cxgb netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 17:04:40 -0000 Author: jhb Date: Tue Jan 5 17:04:39 2010 New Revision: 201594 URL: http://svn.freebsd.org/changeset/base/201594 Log: MFC 200847: - Rename the __tcpi_(snd|rcv)_mss fields of the tcp_info structure to remove the leading underscores since they are now implemented. - Implement the tcpi_rto and tcpi_last_data_recv fields in the tcp_info structure. Modified: stable/7/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c stable/7/sys/netinet/tcp.h stable/7/sys/netinet/tcp_usrreq.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c ============================================================================== --- stable/7/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Tue Jan 5 17:04:14 2010 (r201593) +++ stable/7/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Tue Jan 5 17:04:39 2010 (r201594) @@ -217,7 +217,7 @@ static int set_tcpinfo(struct iwch_ep *e ep->snd_seq = ti.tcpi_snd_nxt; ep->rcv_seq = ti.tcpi_rcv_nxt; - ep->emss = ti.__tcpi_snd_mss - sizeof(struct tcpiphdr); + ep->emss = ti.tcpi_snd_mss - sizeof(struct tcpiphdr); ep->hwtid = TOEPCB(ep->com.so)->tp_tid; /* XXX */ if (ti.tcpi_options & TCPI_OPT_TIMESTAMPS) ep->emss -= 12; Modified: stable/7/sys/netinet/tcp.h ============================================================================== --- stable/7/sys/netinet/tcp.h Tue Jan 5 17:04:14 2010 (r201593) +++ stable/7/sys/netinet/tcp.h Tue Jan 5 17:04:39 2010 (r201594) @@ -181,10 +181,10 @@ struct tcp_info { u_int8_t tcpi_snd_wscale:4, /* RFC1323 send shift value. */ tcpi_rcv_wscale:4; /* RFC1323 recv shift value. */ - u_int32_t __tcpi_rto; + u_int32_t tcpi_rto; /* Retransmission timeout (usec). */ u_int32_t __tcpi_ato; - u_int32_t __tcpi_snd_mss; - u_int32_t __tcpi_rcv_mss; + u_int32_t tcpi_snd_mss; /* Max segment size for send. */ + u_int32_t tcpi_rcv_mss; /* Max segment size for receive. */ u_int32_t __tcpi_unacked; u_int32_t __tcpi_sacked; @@ -195,7 +195,7 @@ struct tcp_info { /* Times; measurements in usecs. */ u_int32_t __tcpi_last_data_sent; u_int32_t __tcpi_last_ack_sent; /* Also unimpl. on Linux? */ - u_int32_t __tcpi_last_data_recv; + u_int32_t tcpi_last_data_recv; /* Time since last recv data. */ u_int32_t __tcpi_last_ack_recv; /* Metrics; variable units. */ Modified: stable/7/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/7/sys/netinet/tcp_usrreq.c Tue Jan 5 17:04:14 2010 (r201593) +++ stable/7/sys/netinet/tcp_usrreq.c Tue Jan 5 17:04:39 2010 (r201594) @@ -1193,6 +1193,8 @@ tcp_fill_info(struct tcpcb *tp, struct t ti->tcpi_rcv_wscale = tp->rcv_scale; } + ti->tcpi_rto = tp->t_rxtcur * tick; + ti->tcpi_last_data_recv = (long)(ticks - (int)tp->t_rcvtime) * tick; ti->tcpi_rtt = ((u_int64_t)tp->t_srtt * tick) >> TCP_RTT_SHIFT; ti->tcpi_rttvar = ((u_int64_t)tp->t_rttvar * tick) >> TCP_RTTVAR_SHIFT; @@ -1206,11 +1208,11 @@ tcp_fill_info(struct tcpcb *tp, struct t ti->tcpi_rcv_nxt = tp->rcv_nxt; ti->tcpi_snd_wnd = tp->snd_wnd; ti->tcpi_snd_bwnd = tp->snd_bwnd; - ti->tcpi_snd_nxt = tp->snd_nxt; - ti->__tcpi_snd_mss = tp->t_maxseg; - ti->__tcpi_rcv_mss = tp->t_maxseg; - if (tp->t_flags & TF_TOE) - ti->tcpi_options |= TCPI_OPT_TOE; + ti->tcpi_snd_nxt = tp->snd_nxt; + ti->tcpi_snd_mss = tp->t_maxseg; + ti->tcpi_rcv_mss = tp->t_maxseg; + if (tp->t_flags & TF_TOE) + ti->tcpi_options |= TCPI_OPT_TOE; } /*