Author: rscheff
Date: Wed Jul  8 09:00:05 2020
New Revision: 363004
URL: https://svnweb.freebsd.org/changeset/base/363004

Log:
  MFC r362577: TCP: make after-idle work for transactional sessions.
  
  The use of t_rcvtime as proxy for the last transmission
  fails for transactional IO, where the client requests
  data before the server can respond with a bulk transfer.
  
  Set aside a dedicated variable to actually track the last
  locally sent segment going forward.
  
  Reported by:  rrs
  Reviewed by:  rrs, tuexen (mentor)
  Approved by:  tuexen (mentor), rgrimes (mentor, blanket)
  MFC after:    2 weeks
  Sponsored by: NetApp, Inc.
  Differential Revision:        https://reviews.freebsd.org/D25016

Modified:
  stable/12/sys/netinet/tcp_output.c
  stable/12/sys/netinet/tcp_var.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_output.c
==============================================================================
--- stable/12/sys/netinet/tcp_output.c  Wed Jul  8 06:33:07 2020        
(r363003)
+++ stable/12/sys/netinet/tcp_output.c  Wed Jul  8 09:00:05 2020        
(r363004)
@@ -246,7 +246,8 @@ tcp_output(struct tcpcb *tp)
         * to send, then transmit; otherwise, investigate further.
         */
        idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una);
-       if (idle && ticks - tp->t_rcvtime >= tp->t_rxtcur)
+       if (idle && (((ticks - tp->t_rcvtime) >= tp->t_rxtcur) ||
+           (tp->t_sndtime && ((ticks - tp->t_sndtime) >= tp->t_rxtcur))))
                cc_after_idle(tp);
        tp->t_flags &= ~TF_LASTIDLE;
        if (idle) {
@@ -1461,6 +1462,7 @@ out:
                         * Time this transmission if not a retransmission and
                         * not currently timing anything.
                         */
+                       tp->t_sndtime = ticks;
                        if (tp->t_rtttime == 0) {
                                tp->t_rtttime = ticks;
                                tp->t_rtseq = startseq;

Modified: stable/12/sys/netinet/tcp_var.h
==============================================================================
--- stable/12/sys/netinet/tcp_var.h     Wed Jul  8 06:33:07 2020        
(r363003)
+++ stable/12/sys/netinet/tcp_var.h     Wed Jul  8 09:00:05 2020        
(r363004)
@@ -152,8 +152,9 @@ struct tcpcb {
        tcp_seq snd_wl2;                /* window update seg ack number */
 
        tcp_seq irs;                    /* initial receive sequence number */
-       tcp_seq iss;                    /* initial send sequence number */
-       u_int   t_acktime;
+       tcp_seq iss;                    /* initial send sequence number */
+       u_int   t_acktime;              /* RACK and BBR incoming new data was 
acked */
+       u_int   t_sndtime;              /* time last data was sent */
        u_int   ts_recent_age;          /* when last updated */
        tcp_seq snd_recover;            /* for use in NewReno Fast Recovery */
        uint16_t cl4_spare;             /* Spare to adjust CL 4 */
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to