From owner-p4-projects@FreeBSD.ORG Tue Jun 21 07:24:24 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 802331065670; Tue, 21 Jun 2011 07:24:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42BB0106566B for ; Tue, 21 Jun 2011 07:24:24 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 175588FC08 for ; Tue, 21 Jun 2011 07:24:24 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p5L7ONrh027158 for ; Tue, 21 Jun 2011 07:24:23 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p5L7ONoM027155 for perforce@freebsd.org; Tue, 21 Jun 2011 07:24:23 GMT (envelope-from cnicutar@freebsd.org) Date: Tue, 21 Jun 2011 07:24:23 GMT Message-Id: <201106210724.p5L7ONoM027155@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 195084 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2011 07:24:24 -0000 http://p4web.freebsd.org/@@195084?ac=10 Change 195084 by cnicutar@cnicutar_cronos on 2011/06/21 07:24:09 Send UTO when sending SYN-ACK Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_syncache.c#2 edit .. //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_syncache.h#2 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_syncache.c#2 (text+ko) ==== @@ -1045,6 +1045,12 @@ win = sbspace(&so->so_rcv); sb_hiwat = so->so_rcv.sb_hiwat; ltflags = (tp->t_flags & (TF_NOOPT | TF_SIGNATURE)); + + /* Set User Timeout to send in SYN-ACK. */ + if (tp->t_flags & TF_SND_UTO) { + to->to_uto = tp->snd_uto; + to->to_flags |= TOF_UTO; + } /* By the time we drop the lock these should no longer be used. */ so = NULL; @@ -1250,6 +1256,10 @@ sc->sc_flags |= SCF_NOOPT; if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn) sc->sc_flags |= SCF_ECN; + if (to->to_flags & TOF_UTO) { + sc->sc_uto = to->to_uto; + sc->sc_flags |= SCF_UTO; + } if (V_tcp_syncookies) { syncookie_generate(sch, sc, &flowtmp); @@ -1412,6 +1422,10 @@ } if (sc->sc_flags & SCF_SACK) to.to_flags |= TOF_SACKPERM; + if (sc->sc_flags & SCF_UTO) { + to.to_uto = sc->sc_uto; + to.to_flags |= TOF_UTO; + } #ifdef TCP_SIGNATURE if (sc->sc_flags & SCF_SIGNATURE) to.to_flags |= TOF_SIGNATURE; ==== //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_syncache.h#2 (text+ko) ==== @@ -74,6 +74,7 @@ u_int8_t sc_ip_tos; /* IPv4 TOS */ u_int8_t sc_requested_s_scale:4, sc_requested_r_scale:4; + u_int16_t sc_uto; /* user timeout to send */ u_int16_t sc_flags; #ifndef TCP_OFFLOAD_DISABLE struct toe_usrreqs *sc_tu; /* TOE operations */ @@ -94,6 +95,7 @@ #define SCF_SIGNATURE 0x20 /* send MD5 digests */ #define SCF_SACK 0x80 /* send SACK option */ #define SCF_ECN 0x100 /* send ECN setup packet */ +#define SCF_UTO 0x200 /* send UTO */ #define SYNCOOKIE_SECRET_SIZE 8 /* dwords */ #define SYNCOOKIE_LIFETIME 16 /* seconds */