Print this page
dccp: conn_t

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip/ipclassifier.c
          +++ new/usr/src/uts/common/inet/ip/ipclassifier.c
↓ open down ↓ 215 lines elided ↑ open up ↑
 216  216   *      Creates a new conn based on the type flag, inserts it into
 217  217   *      globalhash table.
 218  218   *
 219  219   *      type:   This flag determines the type of conn_t which needs to be
 220  220   *              created i.e., which kmem_cache it comes from.
 221  221   *              IPCL_TCPCONN    indicates a TCP connection
 222  222   *              IPCL_SCTPCONN   indicates a SCTP connection
 223  223   *              IPCL_UDPCONN    indicates a UDP conn_t.
 224  224   *              IPCL_RAWIPCONN  indicates a RAWIP/ICMP conn_t.
 225  225   *              IPCL_RTSCONN    indicates a RTS conn_t.
      226 + *              IPCL_DCCPCONN   indicates a DCCP conn_t.
 226  227   *              IPCL_IPCCONN    indicates all other connections.
 227  228   *
 228  229   * void ipcl_conn_destroy(connp)
 229  230   *
 230  231   *      Destroys the connection state, removes it from the global
 231  232   *      connection hash table and frees its memory.
 232  233   */
 233  234  
 234  235  #include <sys/types.h>
 235  236  #include <sys/stream.h>
↓ open down ↓ 14 lines elided ↑ open up ↑
 250  251  #include <netinet/ip6.h>
 251  252  #include <netinet/icmp6.h>
 252  253  
 253  254  #include <inet/ip.h>
 254  255  #include <inet/ip_if.h>
 255  256  #include <inet/ip_ire.h>
 256  257  #include <inet/ip6.h>
 257  258  #include <inet/ip_ndp.h>
 258  259  #include <inet/ip_impl.h>
 259  260  #include <inet/udp_impl.h>
      261 +#include <inet/dccp/dccp_impl.h>
 260  262  #include <inet/sctp_ip.h>
 261  263  #include <inet/sctp/sctp_impl.h>
 262  264  #include <inet/rawip_impl.h>
 263  265  #include <inet/rts_impl.h>
 264  266  #include <inet/iptun/iptun_impl.h>
 265  267  
 266  268  #include <sys/cpuvar.h>
 267  269  
 268  270  #include <inet/ipclassifier.h>
 269  271  #include <inet/tcp.h>
↓ open down ↓ 3 lines elided ↑ open up ↑
 273  275  #include <sys/sockio.h>
 274  276  
 275  277  /* Old value for compatibility. Setable in /etc/system */
 276  278  uint_t tcp_conn_hash_size = 0;
 277  279  
 278  280  /* New value. Zero means choose automatically.  Setable in /etc/system */
 279  281  uint_t ipcl_conn_hash_size = 0;
 280  282  uint_t ipcl_conn_hash_memfactor = 8192;
 281  283  uint_t ipcl_conn_hash_maxsize = 82500;
 282  284  
 283      -/* bind/udp fanout table size */
      285 +/* bind/dccp/udp fanout table size */
 284  286  uint_t ipcl_bind_fanout_size = 512;
      287 +uint_t ipcl_dccp_fanout_size = 512;
 285  288  uint_t ipcl_udp_fanout_size = 16384;
 286  289  
 287  290  /* Raw socket fanout size.  Must be a power of 2. */
 288  291  uint_t ipcl_raw_fanout_size = 256;
 289  292  
 290  293  /*
 291  294   * The IPCL_IPTUN_HASH() function works best with a prime table size.  We
 292  295   * expect that most large deployments would have hundreds of tunnels, and
 293  296   * thousands in the extreme case.
 294  297   */
↓ open down ↓ 17 lines elided ↑ open up ↑
 312  315          conn_t  itc_conn;
 313  316          char    itcu_filler[CACHE_ALIGN(conn_s)];
 314  317  } itc_t;
 315  318  
 316  319  struct kmem_cache  *tcp_conn_cache;
 317  320  struct kmem_cache  *ip_conn_cache;
 318  321  extern struct kmem_cache  *sctp_conn_cache;
 319  322  struct kmem_cache  *udp_conn_cache;
 320  323  struct kmem_cache  *rawip_conn_cache;
 321  324  struct kmem_cache  *rts_conn_cache;
      325 +struct kmem_cache  *dccp_conn_cache;
 322  326  
 323  327  extern void     tcp_timermp_free(tcp_t *);
 324  328  extern mblk_t   *tcp_timermp_alloc(int);
 325  329  
 326  330  static int      ip_conn_constructor(void *, void *, int);
 327  331  static void     ip_conn_destructor(void *, void *);
 328  332  
 329  333  static int      tcp_conn_constructor(void *, void *, int);
 330  334  static void     tcp_conn_destructor(void *, void *);
 331  335  
 332  336  static int      udp_conn_constructor(void *, void *, int);
 333  337  static void     udp_conn_destructor(void *, void *);
 334  338  
 335  339  static int      rawip_conn_constructor(void *, void *, int);
 336  340  static void     rawip_conn_destructor(void *, void *);
 337  341  
 338  342  static int      rts_conn_constructor(void *, void *, int);
 339  343  static void     rts_conn_destructor(void *, void *);
 340  344  
      345 +static int      dccp_conn_constructor(void *, void *, int);
      346 +static void     dccp_conn_destructor(void *, void *);
      347 +
 341  348  /*
 342  349   * Global (for all stack instances) init routine
 343  350   */
 344  351  void
 345  352  ipcl_g_init(void)
 346  353  {
 347  354          ip_conn_cache = kmem_cache_create("ip_conn_cache",
 348  355              sizeof (conn_t), CACHE_ALIGN_SIZE,
 349  356              ip_conn_constructor, ip_conn_destructor,
 350  357              NULL, NULL, NULL, 0);
↓ open down ↓ 10 lines elided ↑ open up ↑
 361  368  
 362  369          rawip_conn_cache = kmem_cache_create("rawip_conn_cache",
 363  370              sizeof (itc_t) + sizeof (icmp_t), CACHE_ALIGN_SIZE,
 364  371              rawip_conn_constructor, rawip_conn_destructor,
 365  372              NULL, NULL, NULL, 0);
 366  373  
 367  374          rts_conn_cache = kmem_cache_create("rts_conn_cache",
 368  375              sizeof (itc_t) + sizeof (rts_t), CACHE_ALIGN_SIZE,
 369  376              rts_conn_constructor, rts_conn_destructor,
 370  377              NULL, NULL, NULL, 0);
      378 +
      379 +        /* XXX:DCCP reclaim */
      380 +        dccp_conn_cache = kmem_cache_create("dccp_conn_cache",
      381 +            sizeof (itc_t) + sizeof (dccp_t), CACHE_ALIGN_SIZE,
      382 +            dccp_conn_constructor, dccp_conn_destructor,
      383 +            NULL, NULL, NULL, 0);
 371  384  }
 372  385  
 373  386  /*
 374  387   * ipclassifier intialization routine, sets up hash tables.
 375  388   */
 376  389  void
 377  390  ipcl_init(ip_stack_t *ipst)
 378  391  {
 379  392          int i;
 380  393          int sizes[] = P2Ps();
↓ open down ↓ 22 lines elided ↑ open up ↑
 403  416                          break;
 404  417                  }
 405  418          }
 406  419          if ((ipst->ips_ipcl_conn_fanout_size = sizes[i]) == 0) {
 407  420                  /* Out of range, use the 2^16 value */
 408  421                  ipst->ips_ipcl_conn_fanout_size = sizes[16];
 409  422          }
 410  423  
 411  424          /* Take values from /etc/system */
 412  425          ipst->ips_ipcl_bind_fanout_size = ipcl_bind_fanout_size;
      426 +        ipst->ips_ipcl_dccp_fanout_size = ipcl_dccp_fanout_size;
 413  427          ipst->ips_ipcl_udp_fanout_size = ipcl_udp_fanout_size;
 414  428          ipst->ips_ipcl_raw_fanout_size = ipcl_raw_fanout_size;
 415  429          ipst->ips_ipcl_iptun_fanout_size = ipcl_iptun_fanout_size;
 416  430  
 417  431          ASSERT(ipst->ips_ipcl_conn_fanout == NULL);
 418  432  
 419  433          ipst->ips_ipcl_conn_fanout = kmem_zalloc(
 420  434              ipst->ips_ipcl_conn_fanout_size * sizeof (connf_t), KM_SLEEP);
 421  435  
 422  436          for (i = 0; i < ipst->ips_ipcl_conn_fanout_size; i++) {
↓ open down ↓ 47 lines elided ↑ open up ↑
 470  484                  mutex_init(&ipst->ips_ipcl_raw_fanout[i].connf_lock, NULL,
 471  485                      MUTEX_DEFAULT, NULL);
 472  486          }
 473  487  
 474  488          ipst->ips_ipcl_globalhash_fanout = kmem_zalloc(
 475  489              sizeof (connf_t) * CONN_G_HASH_SIZE, KM_SLEEP);
 476  490          for (i = 0; i < CONN_G_HASH_SIZE; i++) {
 477  491                  mutex_init(&ipst->ips_ipcl_globalhash_fanout[i].connf_lock,
 478  492                      NULL, MUTEX_DEFAULT, NULL);
 479  493          }
      494 +
      495 +        ipst->ips_ipcl_dccp_fanout = kmem_zalloc(
      496 +            ipst->ips_ipcl_dccp_fanout_size * sizeof (connf_t), KM_SLEEP);
      497 +        for (i = 0; i < ipst->ips_ipcl_dccp_fanout_size; i++) {
      498 +                mutex_init(&ipst->ips_ipcl_dccp_fanout[i].connf_lock, NULL,
      499 +                    MUTEX_DEFAULT, NULL);
      500 +        }
 480  501  }
 481  502  
 482  503  void
 483  504  ipcl_g_destroy(void)
 484  505  {
 485  506          kmem_cache_destroy(ip_conn_cache);
 486  507          kmem_cache_destroy(tcp_conn_cache);
 487  508          kmem_cache_destroy(udp_conn_cache);
 488  509          kmem_cache_destroy(rawip_conn_cache);
 489  510          kmem_cache_destroy(rts_conn_cache);
      511 +        kmem_cache_destroy(dccp_conn_cache);
 490  512  }
 491  513  
 492  514  /*
 493  515   * All user-level and kernel use of the stack must be gone
 494  516   * by now.
 495  517   */
 496  518  void
 497  519  ipcl_destroy(ip_stack_t *ipst)
 498  520  {
 499  521          int i;
↓ open down ↓ 55 lines elided ↑ open up ↑
 555  577          ipst->ips_ipcl_raw_fanout = NULL;
 556  578  
 557  579          for (i = 0; i < CONN_G_HASH_SIZE; i++) {
 558  580                  ASSERT(ipst->ips_ipcl_globalhash_fanout[i].connf_head == NULL);
 559  581                  mutex_destroy(&ipst->ips_ipcl_globalhash_fanout[i].connf_lock);
 560  582          }
 561  583          kmem_free(ipst->ips_ipcl_globalhash_fanout,
 562  584              sizeof (connf_t) * CONN_G_HASH_SIZE);
 563  585          ipst->ips_ipcl_globalhash_fanout = NULL;
 564  586  
      587 +        for (i = 0; i < ipst->ips_ipcl_dccp_fanout_size; i++) {
      588 +                ASSERT(ipst->ips_ipcl_dccp_fanout[i].connf_head == NULL);
      589 +                mutex_destroy(&ipst->ips_ipcl_dccp_fanout[i].connf_lock);
      590 +        }
      591 +        kmem_free(ipst->ips_ipcl_dccp_fanout, ipst->ips_ipcl_dccp_fanout_size *
      592 +            sizeof (connf_t));
      593 +        ipst->ips_ipcl_dccp_fanout = NULL;
      594 +
 565  595          ASSERT(ipst->ips_rts_clients->connf_head == NULL);
 566  596          mutex_destroy(&ipst->ips_rts_clients->connf_lock);
 567  597          kmem_free(ipst->ips_rts_clients, sizeof (connf_t));
 568  598          ipst->ips_rts_clients = NULL;
 569  599  }
 570  600  
 571  601  /*
 572  602   * conn creation routine. initialize the conn, sets the reference
 573  603   * and inserts it in the global hash table.
 574  604   */
↓ open down ↓ 28 lines elided ↑ open up ↑
 603  633                  break;
 604  634  
 605  635          case IPCL_RTSCONN:
 606  636                  conn_cache = rts_conn_cache;
 607  637                  break;
 608  638  
 609  639          case IPCL_IPCCONN:
 610  640                  conn_cache = ip_conn_cache;
 611  641                  break;
 612  642  
      643 +        case IPCL_DCCPCONN:
      644 +                conn_cache = dccp_conn_cache;
      645 +                break;
      646 +
 613  647          default:
 614  648                  connp = NULL;
 615  649                  ASSERT(0);
 616  650          }
 617  651  
 618  652          if ((connp = kmem_cache_alloc(conn_cache, sleep)) == NULL)
 619  653                  return (NULL);
 620  654  
 621  655          connp->conn_ref = 1;
 622  656          netstack_hold(ns);
↓ open down ↓ 90 lines elided ↑ open up ↑
 713  747                  kmem_cache_free(tcp_conn_cache, connp);
 714  748                  return;
 715  749          }
 716  750  
 717  751          if (connp->conn_flags & IPCL_SCTPCONN) {
 718  752                  ASSERT(ns != NULL);
 719  753                  sctp_free(connp);
 720  754                  return;
 721  755          }
 722  756  
      757 +        if (connp->conn_flags & IPCL_DCCPCONN) {
      758 +                dccp_t  *dccp = connp->conn_dccp;
      759 +
      760 +                cmn_err(CE_NOTE, "ipclassifier: conn_flags DCCP cache_free");
      761 +
      762 +                /* XXX:DCCP */
      763 +                /* Crash bug here: udp_conn_cache and dccp_conn_cache */
      764 +/*
      765 +                ipcl_conn_cleanup(connp);
      766 +                connp->conn_flags = IPCL_DCCPCONN;
      767 +                bzero(dccp, sizeof (dccp_t));
      768 +                dccp->dccp_connp = connp;
      769 +                kmem_cache_free(dccp_conn_cache, connp);
      770 +                return;
      771 +*/
      772 +        }
      773 +
 723  774          ipcl_conn_cleanup(connp);
 724  775          if (ns != NULL) {
 725  776                  connp->conn_netstack = NULL;
 726  777                  connp->conn_ixa->ixa_ipst = NULL;
 727  778                  netstack_rele(ns);
 728  779          }
 729  780  
 730  781          /* leave conn_priv aka conn_udp, conn_icmp, etc in place. */
 731  782          if (connp->conn_flags & IPCL_UDPCONN) {
 732  783                  connp->conn_flags = IPCL_UDPCONN;
↓ open down ↓ 496 lines elided ↑ open up ↑
1229 1280                          (*cl_inet_listen)(
1230 1281                              connp->conn_netstack->netstack_stackid,
1231 1282                              IPPROTO_TCP, AF_INET,
1232 1283                              (uint8_t *)&connp->conn_bound_addr_v4, lport, NULL);
1233 1284                  }
1234 1285                  break;
1235 1286  
1236 1287          case IPPROTO_SCTP:
1237 1288                  ret = ipcl_sctp_hash_insert(connp, lport);
1238 1289                  break;
     1290 +
     1291 +        case IPPROTO_DCCP:
     1292 +                cmn_err(CE_NOTE, "ipcl_bind_insert_v4");
     1293 +                ASSERT(connp->conn_zoneid != ALL_ZONES);
     1294 +                connfp = &ipst->ips_ipcl_dccp_fanout[
     1295 +                    IPCL_DCCP_HASH(lport, ipst)];
     1296 +                if (connp->conn_laddr_v4 != INADDR_ANY) {
     1297 +                        IPCL_HASH_INSERT_BOUND(connfp, connp);
     1298 +                } else {
     1299 +                        IPCL_HASH_INSERT_WILDCARD(connfp, connp);
     1300 +                }
     1301 +                /* XXX:DCCP */
     1302 +                break;
1239 1303          }
1240 1304  
     1305 +
1241 1306          return (ret);
1242 1307  }
1243 1308  
1244 1309  int
1245 1310  ipcl_bind_insert_v6(conn_t *connp)
1246 1311  {
1247 1312          connf_t         *connfp;
1248 1313          int             ret = 0;
1249 1314          ip_stack_t      *ipst = connp->conn_netstack->netstack_ip;
1250 1315          uint16_t        lport = connp->conn_lport;
↓ open down ↓ 51 lines elided ↑ open up ↑
1302 1367                          connp->conn_flags |= IPCL_CL_LISTENER;
1303 1368                          (*cl_inet_listen)(
1304 1369                              connp->conn_netstack->netstack_stackid,
1305 1370                              IPPROTO_TCP, addr_family, laddrp, lport, NULL);
1306 1371                  }
1307 1372                  break;
1308 1373  
1309 1374          case IPPROTO_SCTP:
1310 1375                  ret = ipcl_sctp_hash_insert(connp, lport);
1311 1376                  break;
     1377 +
     1378 +        case IPPROTO_DCCP:
     1379 +                /* XXX:DCCP */
     1380 +                break;
1312 1381          }
1313 1382  
1314 1383          return (ret);
1315 1384  }
1316 1385  
1317 1386  /*
1318 1387   * ipcl_conn_hash insertion routines.
1319 1388   * The caller has already set conn_proto and the addresses/ports in the conn_t.
1320 1389   */
1321 1390  
↓ open down ↓ 64 lines elided ↑ open up ↑
1386 1455  
1387 1456          case IPPROTO_SCTP:
1388 1457                  /*
1389 1458                   * The raw socket may have already been bound, remove it
1390 1459                   * from the hash first.
1391 1460                   */
1392 1461                  IPCL_HASH_REMOVE(connp);
1393 1462                  ret = ipcl_sctp_hash_insert(connp, lport);
1394 1463                  break;
1395 1464  
     1465 +        case IPPROTO_DCCP:
     1466 +                cmn_err(CE_NOTE, "ipclassifier.c: ipcl_conn_insert_v4");
     1467 +
     1468 +                connfp = &ipst->ips_ipcl_conn_fanout[
     1469 +                    IPCL_CONN_HASH(connp->conn_faddr_v4,
     1470 +                    connp->conn_ports, ipst)];
     1471 +                mutex_enter(&connfp->connf_lock);
     1472 +
     1473 +                IPCL_HASH_INSERT_CONNECTED_LOCKED(connfp, connp);
     1474 +                mutex_exit(&connfp->connf_lock);
     1475 +                break;
     1476 +
1396 1477          default:
1397 1478                  /*
1398 1479                   * Check for conflicts among MAC exempt bindings.  For
1399 1480                   * transports with port numbers, this is done by the upper
1400 1481                   * level per-transport binding logic.  For all others, it's
1401 1482                   * done here.
1402 1483                   */
1403 1484                  if (is_system_labeled() &&
1404 1485                      check_exempt_conflict_v4(connp, ipst))
1405 1486                          return (EADDRINUSE);
↓ open down ↓ 75 lines elided ↑ open up ↑
1481 1562                  }
1482 1563                  IPCL_HASH_INSERT_CONNECTED_LOCKED(connfp, connp);
1483 1564                  mutex_exit(&connfp->connf_lock);
1484 1565                  break;
1485 1566  
1486 1567          case IPPROTO_SCTP:
1487 1568                  IPCL_HASH_REMOVE(connp);
1488 1569                  ret = ipcl_sctp_hash_insert(connp, lport);
1489 1570                  break;
1490 1571  
     1572 +        case IPPROTO_DCCP:
     1573 +                /* XXX:DCCP */
     1574 +                break;
     1575 +
1491 1576          default:
1492 1577                  if (is_system_labeled() &&
1493 1578                      check_exempt_conflict_v6(connp, ipst))
1494 1579                          return (EADDRINUSE);
1495 1580                  /* FALLTHROUGH */
1496 1581          case IPPROTO_UDP:
1497 1582                  if (protocol == IPPROTO_UDP) {
1498 1583                          connfp = &ipst->ips_ipcl_udp_fanout[
1499 1584                              IPCL_UDP_HASH(lport, ipst)];
1500 1585                  } else {
↓ open down ↓ 147 lines elided ↑ open up ↑
1648 1733                          return (connp);
1649 1734                  }
1650 1735  
1651 1736                  /*
1652 1737                   * We shouldn't come here for multicast/broadcast packets
1653 1738                   */
1654 1739                  mutex_exit(&connfp->connf_lock);
1655 1740  
1656 1741                  break;
1657 1742  
     1743 +        case IPPROTO_DCCP:
     1744 +                fport = up[0];
     1745 +                lport = up[1];
     1746 +                connfp = &ipst->ips_ipcl_dccp_fanout[IPCL_DCCP_HASH(
     1747 +                    lport, ipst)];
     1748 +                mutex_enter(&connfp->connf_lock);
     1749 +                for (connp = connfp->connf_head; connp != NULL;
     1750 +                    connp = connp->conn_next) {
     1751 +                        cmn_err(CE_NOTE, "connfp found");
     1752 +                        /* XXX:DCCP */
     1753 +                        if (IPCL_UDP_MATCH(connp, lport, ipha->ipha_dst,
     1754 +                            fport, ipha->ipha_src)) {
     1755 +                                break;
     1756 +                        }
     1757 +                }
     1758 +
     1759 +                if (connp != NULL) {
     1760 +                        CONN_INC_REF(connp);
     1761 +                        mutex_exit(&connfp->connf_lock);
     1762 +                        return (connp);
     1763 +                }
     1764 +
     1765 +                mutex_exit(&connfp->connf_lock);
     1766 +                break;
     1767 +
1658 1768          case IPPROTO_ENCAP:
1659 1769          case IPPROTO_IPV6:
1660 1770                  return (ipcl_iptun_classify_v4(&ipha->ipha_src,
1661 1771                      &ipha->ipha_dst, ipst));
1662 1772          }
1663 1773  
1664 1774          return (NULL);
1665 1775  }
1666 1776  
1667 1777  conn_t *
↓ open down ↓ 500 lines elided ↑ open up ↑
2168 2278  
2169 2279          /* Can be NULL if constructor failed */
2170 2280          if (connp->conn_ixa != NULL) {
2171 2281                  ASSERT(connp->conn_ixa->ixa_refcnt == 1);
2172 2282                  ASSERT(connp->conn_ixa->ixa_ire == NULL);
2173 2283                  ASSERT(connp->conn_ixa->ixa_nce == NULL);
2174 2284                  ixa_refrele(connp->conn_ixa);
2175 2285          }
2176 2286  }
2177 2287  
     2288 +/* ARGSUSED */
     2289 +static int
     2290 +dccp_conn_constructor(void *buf, void *cdrarg, int kmflags)
     2291 +{
     2292 +        itc_t   *itc = (itc_t *)buf;
     2293 +        conn_t  *connp = &itc->itc_conn;
     2294 +        dccp_t  *dccp = (dccp_t *)&itc[1];
     2295 +
     2296 +        bzero(connp, sizeof (conn_t));
     2297 +        bzero(dccp, sizeof (dccp_t));
     2298 +
     2299 +        mutex_init(&connp->conn_lock, NULL, MUTEX_DEFAULT, NULL);
     2300 +        cv_init(&connp->conn_cv, NULL, CV_DEFAULT, NULL);
     2301 +        rw_init(&connp->conn_ilg_lock, NULL, RW_DEFAULT, NULL);
     2302 +
     2303 +        connp->conn_dccp = dccp;
     2304 +        connp->conn_flags = IPCL_DCCPCONN;
     2305 +        connp->conn_proto = IPPROTO_DCCP;
     2306 +        dccp->dccp_connp = connp;
     2307 +        connp->conn_ixa = kmem_zalloc(sizeof (ip_xmit_attr_t), kmflags);
     2308 +        if (connp->conn_ixa == NULL) {
     2309 +                return (NULL);
     2310 +        }
     2311 +        connp->conn_ixa->ixa_refcnt = 1;
     2312 +        connp->conn_ixa->ixa_protocol = connp->conn_proto;
     2313 +        connp->conn_ixa->ixa_xmit_hint = CONN_TO_XMIT_HINT(connp);
     2314 +
     2315 +        return (0);
     2316 +}
     2317 +
     2318 +/* ARGSUSED */
     2319 +static void
     2320 +dccp_conn_destructor(void *buf, void *cdrarg)
     2321 +{
     2322 +        itc_t   *itc = (itc_t *)buf;
     2323 +        conn_t  *connp = &itc->itc_conn;
     2324 +        dccp_t  *dccp = (dccp_t *)&itc[1];
     2325 +
     2326 +        ASSERT(connp->conn_flags & IPCL_DCCPCONN);
     2327 +        ASSERT(dccp->dccp_connp == connp);
     2328 +        ASSERT(connp->conn_dccp == dccp);
     2329 +
     2330 +        mutex_destroy(&connp->conn_lock);
     2331 +        cv_destroy(&connp->conn_cv);
     2332 +        rw_destroy(&connp->conn_ilg_lock);
     2333 +
     2334 +        if (connp->conn_ixa != NULL) {
     2335 +                ASSERT(connp->conn_ixa->ixa_refcnt == 1);
     2336 +                ASSERT(connp->conn_ixa->ixa_ire == NULL);
     2337 +                ASSERT(connp->conn_ixa->ixa_nce == NULL);
     2338 +
     2339 +                ixa_refrele(connp->conn_ixa);
     2340 +        }
     2341 +}
     2342 +
2178 2343  /*
2179 2344   * Called as part of ipcl_conn_destroy to assert and clear any pointers
2180 2345   * in the conn_t.
2181 2346   *
2182 2347   * Below we list all the pointers in the conn_t as a documentation aid.
2183 2348   * The ones that we can not ASSERT to be NULL are #ifdef'ed out.
2184 2349   * If you add any pointers to the conn_t please add an ASSERT here
2185 2350   * and #ifdef it out if it can't be actually asserted to be NULL.
2186 2351   * In any case, we bzero most of the conn_t at the end of the function.
2187 2352   */
↓ open down ↓ 537 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX