Print this page
OS-4018 lxbrand support TCP SO_REUSEPORT
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Cody Mello <cody.mello@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tcp.h
          +++ new/usr/src/uts/common/inet/tcp.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  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) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  23      - * Copyright (c) 2011, Joyent, Inc. All rights reserved.
       23 + * Copyright 2015 Joyent, Inc.
  24   24   * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved.
  25   25   * Copyright (c) 2014 by Delphix. All rights reserved.
  26   26   */
  27   27  /* Copyright (c) 1990 Mentat Inc. */
  28   28  
  29   29  #ifndef _INET_TCP_H
  30   30  #define _INET_TCP_H
  31   31  
  32   32  #ifdef  __cplusplus
  33   33  extern "C" {
↓ open down ↓ 93 lines elided ↑ open up ↑
 127  127          uint32_t        tha_ack;        /* Acknowledgement number */
 128  128          uint8_t tha_offset_and_reserved; /* Offset to the packet data */
 129  129          uint8_t         tha_flags;
 130  130          uint16_t        tha_win;        /* Allocation number */
 131  131          uint16_t        tha_sum;        /* TCP checksum */
 132  132          uint16_t        tha_urp;        /* Urgent pointer */
 133  133  } tcpha_t;
 134  134  
 135  135  struct conn_s;
 136  136  struct tcp_listen_cnt_s;
      137 +struct tcp_rg_s;
 137  138  
 138  139  /*
 139  140   * Control structure for each open TCP stream,
 140  141   * defined only within the kernel or for a kmem user.
 141  142   * NOTE: tcp_reinit_values MUST have a line for each field in this structure!
 142  143   */
 143  144  #if (defined(_KERNEL) || defined(_KMEMUSER))
 144  145  
 145  146  typedef struct tcp_s {
 146  147          struct tcp_s    *tcp_time_wait_next;
↓ open down ↓ 250 lines elided ↑ open up ↑
 397  398          uint8_t         tcp_closeflags;
 398  399          mblk_t          tcp_closemp;
 399  400          timeout_id_t    tcp_linger_tid; /* Linger timer ID */
 400  401  
 401  402          struct tcp_s *tcp_acceptor_hash; /* Acceptor hash chain */
 402  403          struct tcp_s **tcp_ptpahn; /* Pointer to previous accept hash next. */
 403  404          struct tcp_s *tcp_bind_hash; /* Bind hash chain */
 404  405          struct tcp_s *tcp_bind_hash_port; /* tcp_t's bound to the same lport */
 405  406          struct tcp_s **tcp_ptpbhn;
 406  407  
      408 +        /*
      409 +         * Group of tcp_t entries bound to the same adress and port via
      410 +         * SO_REUSEPORT.  The pointer itself is protected by tf_lock in the
      411 +         * containing tcps_bind_fanout slot.
      412 +         */
      413 +        struct tcp_rg_s *tcp_rg_bind;
      414 +
 407  415          uint_t          tcp_maxpsz_multiplier;
 408  416  
 409  417          uint32_t        tcp_lso_max; /* maximum LSO payload */
 410  418  
 411  419          uint32_t        tcp_ofo_fin_seq; /* Recv out of order FIN seq num */
 412  420          uint32_t        tcp_cwr_snd_max;
 413  421  
 414  422          struct tcp_s *tcp_saved_listener;       /* saved value of listener */
 415  423  
 416  424          uint32_t        tcp_in_ack_unsent;      /* ACK for unsent data cnt. */
↓ open down ↓ 182 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX