<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>[PATCH] alts create destroy QP </TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Fab</FONT>
</P>
<P><FONT SIZE=2>This is a little addition for alts .</FONT>
<BR><FONT SIZE=2>Its basic test that create and destroy QP ( you can reproduce the invalid CQ with it)</FONT>
</P>
<P><FONT SIZE=2>Thanks</FONT>
<BR><FONT SIZE=2>Yossi </FONT>
</P>
<P><FONT SIZE=2>Singed-off-by: Yossi Leybovich (sleybo@mellanox.co.il)</FONT>
</P>
<P><FONT SIZE=2>Index: alts_common.h</FONT>
<BR><FONT SIZE=2>===================================================================</FONT>
<BR><FONT SIZE=2>--- alts_common.h (revision 346)</FONT>
<BR><FONT SIZE=2>+++ alts_common.h (working copy)</FONT>
<BR><FONT SIZE=2>@@ -157,6 +157,9 @@</FONT>
<BR><FONT SIZE=2> IOCTL_CODE(ALDEV_KEY, CmTests)</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2>+#define ALTS_CQ_SIZE 0x50</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2> /*</FONT>
<BR><FONT SIZE=2> * Function Prototypes for the above test cases</FONT>
<BR><FONT SIZE=2> */</FONT>
<BR><FONT SIZE=2>@@ -187,7 +190,15 @@</FONT>
<BR><FONT SIZE=2> ib_api_status_t</FONT>
<BR><FONT SIZE=2> al_test_query_modify_cq( void );</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2> ib_api_status_t</FONT>
<BR><FONT SIZE=2>+al_test_create_destroy_qp( void );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ib_api_status_t</FONT>
<BR><FONT SIZE=2>+al_test_query_modify_qp( void );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ib_api_status_t</FONT>
<BR><FONT SIZE=2> al_test_create_destroy_eec( void );</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> ib_api_status_t</FONT>
<BR><FONT SIZE=2>@@ -253,4 +264,30 @@</FONT>
<BR><FONT SIZE=2> alts_print_ca_attr( ib_ca_attr_t *alts_ca_attr );</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2>+void</FONT>
<BR><FONT SIZE=2>+alts_qp_err_cb(</FONT>
<BR><FONT SIZE=2>+ ib_async_event_rec_t *p_err_rec );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+void</FONT>
<BR><FONT SIZE=2>+alts_qp_destroy_cb(</FONT>
<BR><FONT SIZE=2>+ void *context );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+void</FONT>
<BR><FONT SIZE=2>+alts_cq_comp_cb(</FONT>
<BR><FONT SIZE=2>+ IN const ib_cq_handle_t h_cq,</FONT>
<BR><FONT SIZE=2>+ IN void *cq_context );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+void</FONT>
<BR><FONT SIZE=2>+alts_cq_err_cb(</FONT>
<BR><FONT SIZE=2>+ ib_async_event_rec_t *p_err_rec );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+void</FONT>
<BR><FONT SIZE=2>+alts_cq_destroy_cb(</FONT>
<BR><FONT SIZE=2>+ void *context );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2> #endif // __ALTS_COMMON_H__</FONT>
<BR><FONT SIZE=2>Index: createanddestroycq.c</FONT>
<BR><FONT SIZE=2>===================================================================</FONT>
<BR><FONT SIZE=2>--- createanddestroycq.c (revision 346)</FONT>
<BR><FONT SIZE=2>+++ createanddestroycq.c (working copy)</FONT>
<BR><FONT SIZE=2>@@ -38,11 +38,7 @@</FONT>
<BR><FONT SIZE=2> #include <alts_common.h></FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2>-/*</FONT>
<BR><FONT SIZE=2>- * //NoteNote parameter that can be changed to test CQ functionality</FONT>
<BR><FONT SIZE=2>- */</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2>-#define ALTS_CQ_SIZE 0x50</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> /*</FONT>
<BR><FONT SIZE=2> * Function prototypes</FONT>
<BR><FONT SIZE=2>@@ -52,21 +48,6 @@</FONT>
<BR><FONT SIZE=2> boolean_t modify_cq_attr</FONT>
<BR><FONT SIZE=2> );</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2>-void</FONT>
<BR><FONT SIZE=2>-alts_cq_comp_cb(</FONT>
<BR><FONT SIZE=2>- IN const ib_cq_handle_t h_cq,</FONT>
<BR><FONT SIZE=2>- IN void *cq_context );</FONT>
<BR><FONT SIZE=2>-</FONT>
<BR><FONT SIZE=2>-void</FONT>
<BR><FONT SIZE=2>-alts_cq_err_cb(</FONT>
<BR><FONT SIZE=2>- ib_async_event_rec_t *p_err_rec );</FONT>
<BR><FONT SIZE=2>-</FONT>
<BR><FONT SIZE=2>-void</FONT>
<BR><FONT SIZE=2>-alts_cq_destroy_cb(</FONT>
<BR><FONT SIZE=2>- void *context );</FONT>
<BR><FONT SIZE=2>-</FONT>
<BR><FONT SIZE=2>-</FONT>
<BR><FONT SIZE=2>-</FONT>
<BR><FONT SIZE=2> /*</FONT>
<BR><FONT SIZE=2> * Test Case CrateDestroyCQ</FONT>
<BR><FONT SIZE=2> */</FONT>
<BR><FONT SIZE=2>@@ -210,8 +191,8 @@</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2> CL_ASSERT(h_cq);</FONT>
<BR><FONT SIZE=2> ALTS_PRINT( ALTS_DBG_INFO,\</FONT>
<BR><FONT SIZE=2>- ("ib_create_cq successful status = %s\n",</FONT>
<BR><FONT SIZE=2>- ib_get_err_str(ib_status)) );</FONT>
<BR><FONT SIZE=2>+ ("ib_create_cq successful size = 0x%x status = %s\n",</FONT>
<BR><FONT SIZE=2>+ cq_create.size, ib_get_err_str(ib_status)) );</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> while( modify_cq_attr == TRUE )</FONT>
<BR><FONT SIZE=2> {</FONT>
<BR><FONT SIZE=2>@@ -229,10 +210,20 @@</FONT>
<BR><FONT SIZE=2> ib_get_err_str(ib_status)) );</FONT>
<BR><FONT SIZE=2> break;</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ if(cq_size != cq_create.size)</FONT>
<BR><FONT SIZE=2>+ {</FONT>
<BR><FONT SIZE=2>+ ALTS_PRINT( ALTS_DBG_ERROR,</FONT>
<BR><FONT SIZE=2>+ ("ib_query_cq failed cq_size=0x%x cq_create.cq_size=0x%x\n",</FONT>
<BR><FONT SIZE=2>+ cq_size,cq_create.size));</FONT>
<BR><FONT SIZE=2>+ ib_status = IB_INVALID_CQ_SIZE;</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+ }</FONT>
<BR><FONT SIZE=2>+ </FONT>
<BR><FONT SIZE=2> ALTS_PRINT( ALTS_DBG_INFO,</FONT>
<BR><FONT SIZE=2>- ("ib_query_cq cq_size = %d\n", cq_size) );</FONT>
<BR><FONT SIZE=2>+ ("ib_query_cq cq_size = 0x%x\n", cq_size) );</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2>- cq_size = 0x50;</FONT>
<BR><FONT SIZE=2>+ cq_size = 0x90;</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> ib_status = ib_modify_cq(h_cq,&cq_size);</FONT>
<BR><FONT SIZE=2> if(ib_status != IB_SUCCESS)</FONT>
<BR><FONT SIZE=2>@@ -243,8 +234,8 @@</FONT>
<BR><FONT SIZE=2> break;</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2>- ALTS_PRINT( ALTS_DBG_INFO,</FONT>
<BR><FONT SIZE=2>- ("ib_modify_cq passed for cq_size = %d\n", cq_size) );</FONT>
<BR><FONT SIZE=2>+ ALTS_PRINT( ALTS_DBG_INFO,</FONT>
<BR><FONT SIZE=2>+ ("ib_modify_cq passed for cq_size = 0x%x\n", cq_size) );</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> break; //Break for the while</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2>Index: createanddestroyqp.c</FONT>
<BR><FONT SIZE=2>===================================================================</FONT>
<BR><FONT SIZE=2>--- createanddestroyqp.c (revision 0)</FONT>
<BR><FONT SIZE=2>+++ createanddestroyqp.c (revision 0)</FONT>
<BR><FONT SIZE=2>@@ -0,0 +1,283 @@</FONT>
<BR><FONT SIZE=2>+/*</FONT>
<BR><FONT SIZE=2>+ * Copyright (c) 2005 SilverStorm Technologies. All rights reserved.</FONT>
<BR><FONT SIZE=2>+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. </FONT>
<BR><FONT SIZE=2>+ *</FONT>
<BR><FONT SIZE=2>+ * This software is available to you under the OpenIB.org BSD license</FONT>
<BR><FONT SIZE=2>+ * below:</FONT>
<BR><FONT SIZE=2>+ *</FONT>
<BR><FONT SIZE=2>+ * Redistribution and use in source and binary forms, with or</FONT>
<BR><FONT SIZE=2>+ * without modification, are permitted provided that the following</FONT>
<BR><FONT SIZE=2>+ * conditions are met:</FONT>
<BR><FONT SIZE=2>+ *</FONT>
<BR><FONT SIZE=2>+ * - Redistributions of source code must retain the above</FONT>
<BR><FONT SIZE=2>+ * copyright notice, this list of conditions and the following</FONT>
<BR><FONT SIZE=2>+ * disclaimer.</FONT>
<BR><FONT SIZE=2>+ *</FONT>
<BR><FONT SIZE=2>+ * - Redistributions in binary form must reproduce the above</FONT>
<BR><FONT SIZE=2>+ * copyright notice, this list of conditions and the following</FONT>
<BR><FONT SIZE=2>+ * disclaimer in the documentation and/or other materials</FONT>
<BR><FONT SIZE=2>+ * provided with the distribution.</FONT>
<BR><FONT SIZE=2>+ *</FONT>
<BR><FONT SIZE=2>+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</FONT>
<BR><FONT SIZE=2>+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</FONT>
<BR><FONT SIZE=2>+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</FONT>
<BR><FONT SIZE=2>+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS</FONT>
<BR><FONT SIZE=2>+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN</FONT>
<BR><FONT SIZE=2>+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN</FONT>
<BR><FONT SIZE=2>+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</FONT>
<BR><FONT SIZE=2>+ * SOFTWARE.</FONT>
<BR><FONT SIZE=2>+ *</FONT>
<BR><FONT SIZE=2>+ * $Id: createanddestroycq.c 46 2005-05-30 17:55:53Z sleybo $</FONT>
<BR><FONT SIZE=2>+ */</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+#include <iba/ib_types.h></FONT>
<BR><FONT SIZE=2>+#include <iba/ib_al.h></FONT>
<BR><FONT SIZE=2>+#include <complib/cl_memory.h></FONT>
<BR><FONT SIZE=2>+#include <alts_debug.h></FONT>
<BR><FONT SIZE=2>+#include <alts_common.h></FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+/*</FONT>
<BR><FONT SIZE=2>+ * Function prototypes</FONT>
<BR><FONT SIZE=2>+ */</FONT>
<BR><FONT SIZE=2>+ib_api_status_t</FONT>
<BR><FONT SIZE=2>+alts_qp(</FONT>
<BR><FONT SIZE=2>+ boolean_t modify_cq_attr</FONT>
<BR><FONT SIZE=2>+ );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+/*</FONT>
<BR><FONT SIZE=2>+ * Test Case CrateDestroyQP</FONT>
<BR><FONT SIZE=2>+ */</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ib_api_status_t</FONT>
<BR><FONT SIZE=2>+al_test_create_destroy_qp(void)</FONT>
<BR><FONT SIZE=2>+{</FONT>
<BR><FONT SIZE=2>+ boolean_t modify_qp_attr = FALSE;</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ return alts_qp(modify_qp_attr);</FONT>
<BR><FONT SIZE=2>+}</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ib_api_status_t</FONT>
<BR><FONT SIZE=2>+al_test_query_modify_qp(void)</FONT>
<BR><FONT SIZE=2>+{</FONT>
<BR><FONT SIZE=2>+ boolean_t modify_qp_attr = TRUE;</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ return alts_qp(modify_qp_attr);</FONT>
<BR><FONT SIZE=2>+}</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+/* Internal Functions */</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ib_api_status_t</FONT>
<BR><FONT SIZE=2>+alts_qp(</FONT>
<BR><FONT SIZE=2>+ boolean_t modify_cq_attr</FONT>
<BR><FONT SIZE=2>+ )</FONT>
<BR><FONT SIZE=2>+{</FONT>
<BR><FONT SIZE=2>+ ib_api_status_t ib_status = IB_SUCCESS;</FONT>
<BR><FONT SIZE=2>+ ib_al_handle_t h_al = NULL;</FONT>
<BR><FONT SIZE=2>+ ib_ca_handle_t h_ca;</FONT>
<BR><FONT SIZE=2>+ ib_cq_handle_t h_cq = NULL;</FONT>
<BR><FONT SIZE=2>+ ib_qp_handle_t h_qp = NULL; </FONT>
<BR><FONT SIZE=2>+ ib_pd_handle_t h_pd; </FONT>
<BR><FONT SIZE=2>+ cl_status_t cl_status;</FONT>
<BR><FONT SIZE=2>+ ib_cq_create_t cq_create;</FONT>
<BR><FONT SIZE=2>+ ib_qp_create_t qp_create; </FONT>
<BR><FONT SIZE=2>+ uint32_t bsize; </FONT>
<BR><FONT SIZE=2>+ ib_ca_attr_t *p_ca_attr = NULL;</FONT>
<BR><FONT SIZE=2>+ ib_qp_attr_t p_qp_attr;</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ ALTS_ENTER( ALTS_DBG_VERBOSE );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ while(1)</FONT>
<BR><FONT SIZE=2>+ {</FONT>
<BR><FONT SIZE=2>+ /* Open AL */</FONT>
<BR><FONT SIZE=2>+ ib_status = alts_open_al(&h_al);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ if(ib_status != IB_SUCCESS)</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ CL_ASSERT(h_al);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ /* Open CA */</FONT>
<BR><FONT SIZE=2>+ ib_status = alts_open_ca(h_al,&h_ca);</FONT>
<BR><FONT SIZE=2>+ if(ib_status != IB_SUCCESS)</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ CL_ASSERT(h_ca);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ /*</FONT>
<BR><FONT SIZE=2>+ * Allocate a PD required for CQ</FONT>
<BR><FONT SIZE=2>+ */</FONT>
<BR><FONT SIZE=2>+ ib_status = ib_alloc_pd(h_ca, IB_PDT_NORMAL, NULL, &h_pd); //passing null context</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ if(ib_status != IB_SUCCESS)</FONT>
<BR><FONT SIZE=2>+ {</FONT>
<BR><FONT SIZE=2>+ ALTS_PRINT( ALTS_DBG_ERROR,</FONT>
<BR><FONT SIZE=2>+ ("\tib_alloc_pd failed status = %s\n", ib_get_err_str(ib_status)) );</FONT>
<BR><FONT SIZE=2>+ alts_close_ca(h_ca);</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+ }</FONT>
<BR><FONT SIZE=2>+ ALTS_PRINT( ALTS_DBG_ERROR,</FONT>
<BR><FONT SIZE=2>+ ("\tib_pd handle = %p\n",h_pd));</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ /*</FONT>
<BR><FONT SIZE=2>+ * Get the CA Attributest</FONT>
<BR><FONT SIZE=2>+ * Check for two active ports</FONT>
<BR><FONT SIZE=2>+ */</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ /*</FONT>
<BR><FONT SIZE=2>+ * Query the CA</FONT>
<BR><FONT SIZE=2>+ */</FONT>
<BR><FONT SIZE=2>+ bsize = 0;</FONT>
<BR><FONT SIZE=2>+ ib_status = ib_query_ca(h_ca, NULL, &bsize);</FONT>
<BR><FONT SIZE=2>+ if(ib_status != IB_INSUFFICIENT_MEMORY)</FONT>
<BR><FONT SIZE=2>+ {</FONT>
<BR><FONT SIZE=2>+ ALTS_PRINT(ALTS_DBG_ERROR,</FONT>
<BR><FONT SIZE=2>+ ("ib_query_ca failed with status = %d\n", ib_status) );</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+ }</FONT>
<BR><FONT SIZE=2>+ CL_ASSERT(bsize);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ p_ca_attr = (ib_ca_attr_t *)cl_zalloc(bsize);</FONT>
<BR><FONT SIZE=2>+ if (!p_ca_attr)</FONT>
<BR><FONT SIZE=2>+ {</FONT>
<BR><FONT SIZE=2>+ ALTS_PRINT( ALTS_DBG_ERROR,</FONT>
<BR><FONT SIZE=2>+ ("zalloc() failed for p_ca_attr!\n") );</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+ }</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ ib_status = ib_query_ca(h_ca, p_ca_attr, &bsize);</FONT>
<BR><FONT SIZE=2>+ if(ib_status != IB_SUCCESS)</FONT>
<BR><FONT SIZE=2>+ {</FONT>
<BR><FONT SIZE=2>+ ALTS_PRINT( ALTS_DBG_ERROR,</FONT>
<BR><FONT SIZE=2>+ ("ib_query_ca failed with status = %d\n", ib_status) );</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+ }</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ /*</FONT>
<BR><FONT SIZE=2>+ * Create CQ Attributes</FONT>
<BR><FONT SIZE=2>+ */</FONT>
<BR><FONT SIZE=2>+ cq_create.size = ALTS_CQ_SIZE;</FONT>
<BR><FONT SIZE=2>+ cq_create.pfn_comp_cb = alts_cq_comp_cb;</FONT>
<BR><FONT SIZE=2>+ cq_create.h_wait_obj = NULL;</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ ib_status = ib_create_cq(</FONT>
<BR><FONT SIZE=2>+ h_ca,</FONT>
<BR><FONT SIZE=2>+ &cq_create,</FONT>
<BR><FONT SIZE=2>+ NULL,</FONT>
<BR><FONT SIZE=2>+ alts_cq_err_cb,</FONT>
<BR><FONT SIZE=2>+ &h_cq );</FONT>
<BR><FONT SIZE=2>+ CL_ASSERT(ib_status == IB_SUCCESS);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ </FONT>
<BR><FONT SIZE=2>+ /*</FONT>
<BR><FONT SIZE=2>+ * Create QP Attributes</FONT>
<BR><FONT SIZE=2>+ */</FONT>
<BR><FONT SIZE=2>+ qp_create.sq_depth= 1;</FONT>
<BR><FONT SIZE=2>+ qp_create.rq_depth= 1;</FONT>
<BR><FONT SIZE=2>+ qp_create.sq_sge = 1;</FONT>
<BR><FONT SIZE=2>+ qp_create.rq_sge = 1;</FONT>
<BR><FONT SIZE=2>+ qp_create.h_sq_cq = h_cq; //NULL</FONT>
<BR><FONT SIZE=2>+ qp_create.h_rq_cq = h_cq;</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ qp_create.sq_signaled = TRUE;</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ qp_create.qp_type = IB_QPT_RELIABLE_CONN;</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ </FONT>
<BR><FONT SIZE=2>+ ib_status = ib_create_qp(</FONT>
<BR><FONT SIZE=2>+ h_pd,</FONT>
<BR><FONT SIZE=2>+ &qp_create,</FONT>
<BR><FONT SIZE=2>+ NULL,</FONT>
<BR><FONT SIZE=2>+ alts_qp_err_cb,</FONT>
<BR><FONT SIZE=2>+ &h_qp);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ if (ib_status != IB_SUCCESS)</FONT>
<BR><FONT SIZE=2>+ {</FONT>
<BR><FONT SIZE=2>+ ALTS_PRINT(ALTS_DBG_ERROR,</FONT>
<BR><FONT SIZE=2>+ ("Error in ib_create_qp()! %s\n",</FONT>
<BR><FONT SIZE=2>+ ib_get_err_str(ib_status)));</FONT>
<BR><FONT SIZE=2>+ ALTS_EXIT(ALTS_DBG_VERBOSE);</FONT>
<BR><FONT SIZE=2>+ return (ib_status);</FONT>
<BR><FONT SIZE=2>+ }</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ ib_status = ib_query_qp(h_qp,</FONT>
<BR><FONT SIZE=2>+ &p_qp_attr);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ if (ib_status != IB_SUCCESS)</FONT>
<BR><FONT SIZE=2>+ {</FONT>
<BR><FONT SIZE=2>+ ALTS_PRINT(ALTS_DBG_ERROR,</FONT>
<BR><FONT SIZE=2>+ ("Error in query_qp()! %s\n",</FONT>
<BR><FONT SIZE=2>+ ib_get_err_str(ib_status)));</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ ib_destroy_qp(h_qp,alts_qp_destroy_cb);</FONT>
<BR><FONT SIZE=2>+ ALTS_EXIT(ALTS_DBG_VERBOSE);</FONT>
<BR><FONT SIZE=2>+ return (ib_status);</FONT>
<BR><FONT SIZE=2>+ }</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ ib_status = ib_destroy_qp(h_qp, alts_qp_destroy_cb);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ if (h_cq)</FONT>
<BR><FONT SIZE=2>+ ib_status = ib_destroy_cq(h_cq, alts_qp_destroy_cb);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ ib_status = ib_dealloc_pd(h_pd,alts_pd_destroy_cb);</FONT>
<BR><FONT SIZE=2>+ if(ib_status != IB_SUCCESS)</FONT>
<BR><FONT SIZE=2>+ {</FONT>
<BR><FONT SIZE=2>+ ALTS_PRINT( ALTS_DBG_ERROR,</FONT>
<BR><FONT SIZE=2>+ ("ib_dealloc_pd failed status = %s\n",</FONT>
<BR><FONT SIZE=2>+ ib_get_err_str(ib_status)) );</FONT>
<BR><FONT SIZE=2>+ }</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ alts_close_ca(h_ca);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ break; //End of while</FONT>
<BR><FONT SIZE=2>+ }</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ /* Close AL */</FONT>
<BR><FONT SIZE=2>+ if(h_al)</FONT>
<BR><FONT SIZE=2>+ alts_close_al(h_al);</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ ALTS_EXIT( ALTS_DBG_VERBOSE);</FONT>
<BR><FONT SIZE=2>+ return ib_status;</FONT>
<BR><FONT SIZE=2>+}</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+void</FONT>
<BR><FONT SIZE=2>+alts_qp_err_cb(</FONT>
<BR><FONT SIZE=2>+ ib_async_event_rec_t *p_err_rec )</FONT>
<BR><FONT SIZE=2>+{</FONT>
<BR><FONT SIZE=2>+ ALTS_ENTER( ALTS_DBG_VERBOSE );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ UNUSED_PARAM( p_err_rec );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ ALTS_EXIT( ALTS_DBG_VERBOSE);</FONT>
<BR><FONT SIZE=2>+}</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+void</FONT>
<BR><FONT SIZE=2>+alts_qp_destroy_cb(</FONT>
<BR><FONT SIZE=2>+ void *context</FONT>
<BR><FONT SIZE=2>+ )</FONT>
<BR><FONT SIZE=2>+{</FONT>
<BR><FONT SIZE=2>+ ALTS_ENTER( ALTS_DBG_VERBOSE );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ UNUSED_PARAM( context );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ ALTS_EXIT( ALTS_DBG_VERBOSE);</FONT>
<BR><FONT SIZE=2>+}</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>Index: user/alts_main.c</FONT>
<BR><FONT SIZE=2>===================================================================</FONT>
<BR><FONT SIZE=2>--- user/alts_main.c (revision 346)</FONT>
<BR><FONT SIZE=2>+++ user/alts_main.c (working copy)</FONT>
<BR><FONT SIZE=2>@@ -182,9 +182,7 @@</FONT>
<BR><FONT SIZE=2> ib_status = al_test_query_modify_av();</FONT>
<BR><FONT SIZE=2> break;</FONT>
<BR><FONT SIZE=2> case CreateDestroyQP:</FONT>
<BR><FONT SIZE=2>- CL_PRINT( ALTS_DBG_VERBOSE, alts_dbg_lvl,</FONT>
<BR><FONT SIZE=2>- ("altsapp: CreateDestroyQP not implemented.\n") );</FONT>
<BR><FONT SIZE=2>- ib_status = IB_SUCCESS;</FONT>
<BR><FONT SIZE=2>+ ib_status = al_test_create_destroy_qp();</FONT>
<BR><FONT SIZE=2> break;</FONT>
<BR><FONT SIZE=2> case QueryAndModifyQP:</FONT>
<BR><FONT SIZE=2> CL_PRINT( ALTS_DBG_VERBOSE, alts_dbg_lvl,</FONT>
<BR><FONT SIZE=2>Index: user/alts_sources.c</FONT>
<BR><FONT SIZE=2>===================================================================</FONT>
<BR><FONT SIZE=2>--- user/alts_sources.c (revision 346)</FONT>
<BR><FONT SIZE=2>+++ user/alts_sources.c (working copy)</FONT>
<BR><FONT SIZE=2>@@ -37,6 +37,7 @@</FONT>
<BR><FONT SIZE=2> #include "../../shared/alts/alts_misc.c"</FONT>
<BR><FONT SIZE=2> #include "../../shared/alts/cmtests.c"</FONT>
<BR><FONT SIZE=2> #include "../../shared/alts/createanddestroycq.c"</FONT>
<BR><FONT SIZE=2>+#include "../../shared/alts/createanddestroyqp.c"</FONT>
<BR><FONT SIZE=2> #include "../../shared/alts/createdestroyav.c"</FONT>
<BR><FONT SIZE=2> #include "../../shared/alts/creatememwindow.c"</FONT>
<BR><FONT SIZE=2> #include "../../shared/alts/ibquery.c"</FONT>
<BR><FONT SIZE=2>Index: user/SOURCES</FONT>
<BR><FONT SIZE=2>===================================================================</FONT>
<BR><FONT SIZE=2>--- user/SOURCES (revision 346)</FONT>
<BR><FONT SIZE=2>+++ user/SOURCES (working copy)</FONT>
<BR><FONT SIZE=2>@@ -9,6 +9,7 @@</FONT>
<BR><FONT SIZE=2> ..\alts_misc.c \</FONT>
<BR><FONT SIZE=2> ..\cmtests.c \</FONT>
<BR><FONT SIZE=2> ..\createanddestroycq.c \</FONT>
<BR><FONT SIZE=2>+ ..\createanddestroyqp.c \</FONT>
<BR><FONT SIZE=2> ..\createdestroyav.c \</FONT>
<BR><FONT SIZE=2> ..\creatememwindow.c \</FONT>
<BR><FONT SIZE=2> ..\ibquery.c \</FONT>
</P>
<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT>
</BODY>
</HTML>