Udiff ib.h
--- /webrev/webrev/usr/src/uts/common/rpc/ib.h- Mon Aug 14 13:12:10 2006
+++ ib.h        Thu Aug 10 14:05:27 2006
@@ -22,10 +22,22 @@
 /*
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+ /* Copyright (c) 2006, The Ohio State University. All rights reserved.
+  *
+  * Portions of this source code is developed by the team members of
+  * The Ohio State University's Network-Based Computing Laboratory (NBCL),
+  * headed by Professor Dhabaleswar K. (DK) Panda.
+  *
+  * Acknowledgements to contributions from developors:
+  *   Ranjit Noronha: noronha@cse.ohio-state.edu
+  *   Lei Chai      : chail@cse.ohio-state.edu
+  *   Weikuan Yu    : yuw@cse.ohio-state.edu
+  *
+  */
 #ifndef _IB_H
 #define        _IB_H
 
 #pragma ident  "@(#)ib.h       1.8     05/06/08 SMI"
 
@@ -39,10 +51,13 @@
 #include <sys/conf.h>
 #include <sys/stat.h>
 #include <rpc/rpc.h>
 #include <rpc/rpc_rdma.h>
 #include <sys/ib/ibtl/ibti.h>
+#ifdef SERVER_REG_CACHE
+#include <sys/avl.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
@@ -120,11 +135,16 @@
 } bufpool_t;
 
 typedef struct {
        bufpool_t       *bpool;
        ibt_mr_hdl_t    *mr_hdl;
+#ifdef IB_FMR_SUP
+        ibt_ma_hdl_t    *ma_hdl;
+        ibt_pmr_desc_t  *pmr_desc;
+#endif
        ibt_mr_desc_t   *mr_desc;       /* vaddr, lkey, rkey */
+       
 } rib_bufpool_t;
 
 /*
  * ATS relsted defines and structures.
  */
@@ -277,25 +297,48 @@
 
        rib_bufpool_t           *recv_pool;     /* recv buf pool */
        rib_bufpool_t           *send_pool;     /* send buf pool */
 
        void                    *iblock;        /* interrupt cookie */
+
+#ifdef IB_FMR_SUP
+        ibt_fmr_pool_hdl_t      fmr_pool;
+#endif          /* IB_FMR_SUP */
+
+#ifdef SERVER_REG_CACHE
+        kmem_cache_t            *server_side_cache;      /* long reply pool */
+       avl_tree_t              avl_tree;
+       kmutex_t                 avl_lock;
+       krwlock_t                avl_rw_lock;
+       volatile bool_t          avl_init;
+#endif
+
 };
 
 
 /*
  * Structure on wait state of a post send
  */
 struct send_wid {
+#if defined (CLNT_INTERRUPT_COAL)
+       struct send_wid *forw;
+       struct send_wid *back;
+#endif
        uint32_t        xid;
        int             cv_sig;
        kmutex_t        sendwait_lock;
        kcondvar_t      wait_cv;
        uint_t          status;
        rib_qp_t        *qp;
        int             nsbufs;                 /* # of send buffers posted */
        uint64_t        sbufaddr[DSEG_MAX];     /* posted send buffers */
+        caddr_t         c;
+        caddr_t         c1;
+        int             l1;    
+        caddr_t         c2;    
+       int             l2;
+       int             wl,rl;
 };
 
 /*
  * Structure on reply descriptor for recv queue.
  * Different from the above posting of a descriptor.
@@ -360,10 +403,11 @@
 
        kmutex_t                cb_lock;
        kcondvar_t              cb_conn_cv;
 
        caddr_t                 q;      /* upstream queue */
+       struct send_wid        wd;
 };
 
 #define        ctoqp(conn)     ((rib_qp_t *)((conn)->c_private))
 #define        qptoc(rqp)      ((CONN *)&((rqp)->rdmaconn))