Date: Thu, 21 Feb 2008 02:24:25 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 135867 for review Message-ID: <200802210224.m1L2OPT1036981@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135867 Change 135867 by kmacy@kmacy:entropy:iwarp on 2008/02/21 02:23:32 bump rcv_nxt if we haven't received a FIN before Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#14 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#14 (text+ko) ==== @@ -2389,7 +2389,6 @@ struct tcpcb *tp = sototcpcb(so); struct toepcb *toep = tp->t_toe; int keep = 0; - DPRINTF("do_peer_fin state=%d\n", tp->t_state); #ifdef T3_TRACE @@ -2411,8 +2410,22 @@ return; } } - if (TCPS_HAVERCVDFIN(tp->t_state) == 0) + if (TCPS_HAVERCVDFIN(tp->t_state) == 0) { socantrcvmore(so); + /* + * If connection is half-synchronized + * (ie NEEDSYN flag on) then delay ACK, + * so it may be piggybacked when SYN is sent. + * Otherwise, since we received a FIN then no + * more input can be expected, send ACK now. + */ + if (tp->t_flags & TF_NEEDSYN) + tp->t_flags |= TF_DELACK; + else + tp->t_flags |= TF_ACKNOW; + tp->rcv_nxt++; + } + switch (tp->t_state) { case TCPS_SYN_RECEIVED: tp->t_starttime = ticks; @@ -3113,7 +3126,6 @@ to.to_mss = mss; to.to_wscale = wsf; to.to_flags = (mss ? TOF_MSS : 0) | (wsf ? TOF_SCALE : 0) | (ts ? TOF_TS : 0) | (sack ? TOF_SACKPERM : 0); - INP_INFO_WLOCK(&tcbinfo); INP_LOCK(inp); syncache_offload_add(&inc, &to, &th, inp, &lso, &cxgb_toe_usrreqs, toep); @@ -3359,8 +3371,9 @@ tp->t_flags |= G_TCPOPT_TSTAMP(opt) ? TF_RCVD_TSTMP : 0; tp->t_flags |= G_TCPOPT_SACK(opt) ? TF_SACK_PERMIT : 0; tp->t_flags |= G_TCPOPT_WSCALE_OK(opt) ? TF_RCVD_SCALE : 0; - if (tp->t_flags & TF_RCVD_SCALE) - tp->rcv_scale = 0; + if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) == + (TF_RCVD_SCALE|TF_REQ_SCALE)) + tp->rcv_scale = tp->request_r_scale; } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802210224.m1L2OPT1036981>