From owner-p4-projects@FreeBSD.ORG Thu Jul 23 14:34:30 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C0B241065673; Thu, 23 Jul 2009 14:34:29 +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 7EEC51065670 for ; Thu, 23 Jul 2009 14:34:29 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6CA988FC1A for ; Thu, 23 Jul 2009 14:34:29 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n6NEYTSM032108 for ; Thu, 23 Jul 2009 14:34:29 GMT (envelope-from andre@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6NEYTsm032106 for perforce@freebsd.org; Thu, 23 Jul 2009 14:34:29 GMT (envelope-from andre@freebsd.org) Date: Thu, 23 Jul 2009 14:34:29 GMT Message-Id: <200907231434.n6NEYTsm032106@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andre@freebsd.org using -f From: Andre Oppermann To: Perforce Change Reviews Cc: Subject: PERFORCE change 166451 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 14:34:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=166451 Change 166451 by andre@andre_t61 on 2009/07/23 14:34:26 Bring back tcp reassembly timers lost in the last integrate/resolve. Affected files ... .. //depot/projects/tcp_reass/netinet/tcp_timer.c#10 edit Differences ... ==== //depot/projects/tcp_reass/netinet/tcp_timer.c#10 (text+ko) ==== @@ -597,6 +597,46 @@ } void +tcp_timer_reass(void *xtp) +{ + struct tcpcb *tp = xtp; + struct inpcb *inp; + CURVNET_SET(tp->t_vnet); + + INP_INFO_RLOCK(&V_tcbinfo); + inp = tp->t_inpcb; + /* + * XXXRW: While this assert is in fact correct, bugs in the tcpcb + * tear-down mean we need it as a work-around for races between + * timers and tcp_discardcb(). + * + * KASSERT(inp != NULL, ("tcp_timer_reass: inp == NULL")); + */ + if (inp == NULL) { + tcp_timer_race++; + INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); + return; + } + INP_WLOCK(inp); + INP_INFO_RUNLOCK(&V_tcbinfo); + if ((inp->inp_vflag & INP_DROPPED) || callout_pending(&tp->t_timers->tt_reass) + || !callout_active(&tp->t_timers->tt_reass)) { + INP_WUNLOCK(inp); + CURVNET_RESTORE(); + return; + } + callout_deactivate(&tp->t_timers->tt_reass); + + TCPSTAT_INC(tcps_reass_flush); + tcp_reass_flush(tp); + tp->t_flags |= TF_ACKNOW; + (void) tcp_output(tp); + INP_WUNLOCK(inp); + CURVNET_RESTORE(); +} + +void tcp_timer_activate(struct tcpcb *tp, int timer_type, u_int delta) { struct callout *t_callout; @@ -623,6 +663,10 @@ t_callout = &tp->t_timers->tt_2msl; f_callout = tcp_timer_2msl; break; + case TT_REASS: + t_callout = &tp->t_timers->tt_reass; + f_callout = tcp_timer_reass; + break; default: panic("bad timer_type"); } @@ -654,6 +698,8 @@ case TT_2MSL: t_callout = &tp->t_timers->tt_2msl; break; + case TT_REASS: + t_callout = &tp->t_timers->tt_reass; default: panic("bad timer_type"); }