Print this page
DLPX-25998 TCP congestion control is inadequate
Reviewed at: http://reviews.delphix.com/r/34808/
DLPX-43064 include high-resolution round-trip times in connstat (EP-652)
DLPX-42721 Create inline function for TCP RTO calculation

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tcp_impl.h
          +++ new/usr/src/uts/common/inet/tcp_impl.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright 2017 Joyent, Inc.
  24   24   * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
  25      - * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
       25 + * Copyright (c) 2013, 2017 by Delphix. All rights reserved.
  26   26   */
  27   27  
  28   28  #ifndef _INET_TCP_IMPL_H
  29   29  #define _INET_TCP_IMPL_H
  30   30  
  31   31  /*
  32   32   * TCP implementation private declarations.  These interfaces are
  33   33   * used to build the IP module and are not meant to be accessed
  34   34   * by any modules except IP itself.  They are undocumented and are
  35   35   * subject to change without notice.
↓ open down ↓ 257 lines elided ↑ open up ↑
 293  293          if ((tcp)->tcp_connp->conn_ipversion == IPV4_VERSION) { \
 294  294                  /* We need to clear the code point first. */ \
 295  295                  ((ipha_t *)(iph))->ipha_type_of_service &= 0xFC; \
 296  296                  ((ipha_t *)(iph))->ipha_type_of_service |= IPH_ECN_ECT0; \
 297  297          } else { \
 298  298                  ((ip6_t *)(iph))->ip6_vcf &= htonl(0xFFCFFFFF); \
 299  299                  ((ip6_t *)(iph))->ip6_vcf |= htonl(IPH_ECN_ECT0 << 20); \
 300  300          }
 301  301  
 302  302  /*
 303      - * Set tcp_rto with boundary checking.
 304      - */
 305      -#define TCP_SET_RTO(tcp, rto) \
 306      -        if ((rto) < (tcp)->tcp_rto_min)                 \
 307      -                (tcp)->tcp_rto = (tcp)->tcp_rto_min;    \
 308      -        else if ((rto) > (tcp)->tcp_rto_max)            \
 309      -                (tcp)->tcp_rto = (tcp)->tcp_rto_max;    \
 310      -        else                                            \
 311      -                (tcp)->tcp_rto = (rto);
 312      -
 313      -/*
 314  303   * TCP options struct returned from tcp_parse_options.
 315  304   */
 316  305  typedef struct tcp_opt_s {
 317  306          uint32_t        tcp_opt_mss;
 318  307          uint32_t        tcp_opt_wscale;
 319  308          uint32_t        tcp_opt_ts_val;
 320  309          uint32_t        tcp_opt_ts_ecr;
 321  310          tcp_t           *tcp;
 322  311  } tcp_opt_t;
 323  312  
↓ open down ↓ 258 lines elided ↑ open up ↑
 582  571  #define tcps_keepalive_abort_interval_high \
 583  572                                          tcps_propinfo_tbl[56].prop_max_uval
 584  573  #define tcps_keepalive_abort_interval \
 585  574                                          tcps_propinfo_tbl[56].prop_cur_uval
 586  575  #define tcps_keepalive_abort_interval_low \
 587  576                                          tcps_propinfo_tbl[56].prop_min_uval
 588  577  #define tcps_wroff_xtra                 tcps_propinfo_tbl[57].prop_cur_uval
 589  578  #define tcps_dev_flow_ctl               tcps_propinfo_tbl[58].prop_cur_bval
 590  579  #define tcps_reass_timeout              tcps_propinfo_tbl[59].prop_cur_uval
 591  580  #define tcps_iss_incr                   tcps_propinfo_tbl[65].prop_cur_uval
      581 +#define tcps_abc                        tcps_propinfo_tbl[67].prop_cur_bval
      582 +#define tcps_abc_l_var                  tcps_propinfo_tbl[68].prop_cur_uval
 592  583  
 593  584  extern struct qinit tcp_rinitv4, tcp_rinitv6;
 594  585  extern boolean_t do_tcp_fusion;
 595  586  
 596  587  /*
 597  588   * Object to represent database of options to search passed to
 598  589   * {sock,tpi}optcom_req() interface routine to take care of option
 599  590   * management and associated methods.
 600  591   */
 601  592  extern optdb_obj_t      tcp_opt_obj;
↓ open down ↓ 4 lines elided ↑ open up ↑
 606  597  extern uint_t tcp_free_list_max_cnt;
 607  598  
 608  599  /*
 609  600   * Functions in tcp.c.
 610  601   */
 611  602  extern void     tcp_acceptor_hash_insert(t_uscalar_t, tcp_t *);
 612  603  extern tcp_t    *tcp_acceptor_hash_lookup(t_uscalar_t, tcp_stack_t *);
 613  604  extern void     tcp_acceptor_hash_remove(tcp_t *);
 614  605  extern mblk_t   *tcp_ack_mp(tcp_t *);
 615  606  extern int      tcp_build_hdrs(tcp_t *);
      607 +extern clock_t  tcp_calculate_rto(tcp_t *, tcp_stack_t *);
 616  608  extern void     tcp_cleanup(tcp_t *);
 617  609  extern int      tcp_clean_death(tcp_t *, int);
 618  610  extern void     tcp_clean_death_wrapper(void *, mblk_t *, void *,
 619  611                      ip_recv_attr_t *);
 620  612  extern void     tcp_close_common(conn_t *, int);
 621  613  extern void     tcp_close_detached(tcp_t *);
 622  614  extern void     tcp_close_mpp(mblk_t **);
 623  615  extern void     tcp_closei_local(tcp_t *);
 624  616  extern sock_lower_handle_t tcp_create(int, int, int, sock_downcalls_t **,
 625  617                      uint_t *, int *, int, cred_t *);
↓ open down ↓ 76 lines elided ↑ open up ↑
 702  694  extern void     tcp_wput_fallback(queue_t *, mblk_t *);
 703  695  extern void     tcp_xmit_ctl(char *, tcp_t *, uint32_t, uint32_t, int);
 704  696  extern void     tcp_xmit_listeners_reset(mblk_t *, ip_recv_attr_t *,
 705  697                      ip_stack_t *i, conn_t *);
 706  698  extern mblk_t   *tcp_xmit_mp(tcp_t *, mblk_t *, int32_t, int32_t *,
 707  699                      mblk_t **, uint32_t, boolean_t, uint32_t *, boolean_t);
 708  700  
 709  701  /*
 710  702   * Input related functions in tcp_input.c.
 711  703   */
      704 +extern void     cc_cong_signal(tcp_t *, uint32_t, uint32_t);
 712  705  extern void     tcp_icmp_input(void *, mblk_t *, void *, ip_recv_attr_t *);
 713  706  extern void     tcp_input_data(void *, mblk_t *, void *, ip_recv_attr_t *);
 714  707  extern void     tcp_input_listener_unbound(void *, mblk_t *, void *,
 715  708                      ip_recv_attr_t *);
 716  709  extern boolean_t        tcp_paws_check(tcp_t *, const tcp_opt_t *);
 717  710  extern int      tcp_parse_options(tcpha_t *, tcp_opt_t *);
 718  711  extern uint_t   tcp_rcv_drain(tcp_t *);
 719  712  extern void     tcp_rcv_enqueue(tcp_t *, mblk_t *, uint_t, cred_t *);
 720  713  extern boolean_t        tcp_verifyicmp(conn_t *, void *, icmph_t *, icmp6_t *,
 721  714                              ip_recv_attr_t *);
↓ open down ↓ 80 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX