git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@588 ad392aa1-c5ef-ae45-8dd8-e69d62...
[mirror/winof/.git] / core / al / kernel / al_smi.h
index e9f452d..883d970 100644 (file)
@@ -66,23 +66,71 @@ typedef enum _spl_qp_svc_state
 \r
 }      spl_qp_svc_state_t;\r
 \r
+/*\r
+ * Attribute cache for port info saved to expedite local MAD processing.\r
+ * Note that the cache accounts for the worst case GID and PKEY table size\r
+ * but is allocated from paged pool, so it's nothing to worry about.\r
+ */\r
+\r
+typedef struct _guid_block\r
+{\r
+       boolean_t                               valid;\r
+       ib_guid_info_t                  tbl;\r
+\r
+}      guid_block_t;\r
+\r
+\r
+typedef struct _pkey_block\r
+{\r
+       boolean_t                               valid;\r
+       ib_pkey_table_info_t    tbl;\r
+\r
+}      pkey_block_t;\r
+\r
+typedef struct _sl_vl_cache\r
+{\r
+       boolean_t                               valid;\r
+       ib_slvl_table_t                 tbl;\r
+\r
+}      sl_vl_cache_t;\r
+\r
+typedef struct _vl_arb_block\r
+{\r
+       boolean_t                               valid;\r
+       ib_vl_arb_table_t               tbl;\r
+\r
+}      vl_arb_block_t;\r
+\r
+typedef struct _attr_cache\r
+{\r
+       guid_block_t            guid_block[32];\r
+       pkey_block_t            pkey_tbl[2048];\r
+       sl_vl_cache_t           sl_vl;\r
+       vl_arb_block_t  vl_arb[4];\r
+\r
+}      spl_qp_cache_t;\r
 \r
 \r
 /* Per port special QP service */\r
 typedef struct _spl_qp_svc\r
 {\r
-       al_obj_t                                        obj;            /* Child of spl_qp_agent_t */\r
+       al_obj_t                                                obj;            /* Child of spl_qp_agent_t */\r
        cl_map_item_t                           map_item;       /* Item on SMI/GSI list */\r
 \r
        net64_t                                         port_guid;\r
        uint8_t                                         port_num;\r
        ib_net16_t                                      base_lid;\r
        uint8_t                                         lmc;\r
-\r
+       \r
        ib_net16_t                                      sm_lid;\r
        uint8_t                                         sm_sl;\r
+       ib_net64_t                                      m_key;\r
 \r
-       al_mad_disp_handle_t            h_mad_disp;\r
+       spl_qp_cache_t                          cache;\r
+       cl_spinlock_t                                   cache_lock;\r
+       boolean_t                                       cache_en;\r
+       \r
+       al_mad_disp_handle_t                    h_mad_disp;\r
        ib_cq_handle_t                          h_send_cq;\r
        ib_cq_handle_t                          h_recv_cq;\r
        ib_qp_handle_t                          h_qp;\r