{\r
status = uvp_intf.pre_create_av( h_pd->h_ci_pd,\r
p_av_attr, &ioctl_buf.in.umv_buf, &h_av->h_ci_av );\r
- if( status == IB_VERBS_PROCESSING_DONE )\r
+ if( status != IB_SUCCESS )\r
{\r
- /* Creation is done entirely in user mode. Issue the post call */\r
- if( uvp_intf.post_create_av )\r
- {\r
- uvp_intf.post_create_av( h_pd->h_ci_pd,\r
- IB_SUCCESS, &h_av->h_ci_av, &ioctl_buf.in.umv_buf );\r
- }\r
AL_EXIT( AL_DBG_AV );\r
- return IB_SUCCESS;\r
- }\r
- else if( status != IB_SUCCESS )\r
- {\r
- AL_EXIT( AL_DBG_AV );\r
- return status;\r
+ return (status == IB_VERBS_PROCESSING_DONE) ? IB_SUCCESS : status;\r
}\r
}\r
\r
status = uvp_intf.pre_destroy_av( h_av->h_ci_av );\r
CL_ASSERT( (status == IB_SUCCESS) ||\r
(status == IB_VERBS_PROCESSING_DONE) );\r
- if( status == IB_VERBS_PROCESSING_DONE )\r
- {\r
- /* Destruction is done in user mode. Issue the post call */\r
- if( uvp_intf.post_destroy_av )\r
- uvp_intf.post_destroy_av( h_av->h_ci_av, IB_SUCCESS );\r
-\r
- AL_EXIT( AL_DBG_AV );\r
- return IB_SUCCESS;\r
- }\r
- else if( status != IB_SUCCESS )\r
+ if( status != IB_SUCCESS )\r
{\r
AL_EXIT( AL_DBG_AV );\r
- return status;\r
+ return (status == IB_VERBS_PROCESSING_DONE) ? IB_SUCCESS : status;\r
}\r
}\r
\r
#include "mlnx_ual_av.tmh"\r
#endif\r
\r
+static void\r
+__post_create_av (\r
+ IN const ib_pd_handle_t h_uvp_pd,\r
+ IN ib_api_status_t ioctl_status,\r
+ IN OUT ib_av_handle_t *ph_uvp_av,\r
+ IN OUT ci_umv_buf_t *p_umv_buf);\r
+\r
\r
uint8_t\r
gid_to_index_lookup (\r
p_create_av->mr.access_flags = 0; //local read\r
status = IB_SUCCESS;\r
}\r
- else\r
+ else {\r
+ __post_create_av(h_uvp_pd, IB_SUCCESS, ph_uvp_av, p_umv_buf);\r
status = IB_VERBS_PROCESSING_DONE;\r
-\r
+ }\r
goto end;\r
\r
err_mem: \r
UVP_ENTER(UVP_DBG_AV);\r
if (mthca_ah->in_kernel)\r
status = IB_SUCCESS;\r
- else\r
+ else {\r
+ mthca_free_av(mthca_ah);\r
+ cl_free(mthca_ah);\r
status = IB_VERBS_PROCESSING_DONE;\r
+ }\r
UVP_EXIT(UVP_DBG_AV);\r
return status;\r
}\r