[ofw] [PATCH] MLX4- clean ibv_context

Reuven Amitai reuven at mellanox.co.il
Wed Aug 27 09:34:46 PDT 2008


Hi Leonid,
 
The patch cleans ibv_context struct. mutex filed used to guard p_ca_attr
that was used in "get_gid_index".
p_ca_attr was removed when "get_gid_index" moved from uvp to ibal code.
[MLNX : 3051]
 
Thanks, Reuven.
 
 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Index: hw/mlx4/user/hca/mlx4.c
===================================================================
--- hw/mlx4/user/hca/mlx4.c (revision 1521)
+++ hw/mlx4/user/hca/mlx4.c (working copy)
@@ -78,10 +78,6 @@
  if (!context->db_list_mutex)
   goto err_db_mutex;
 
- context->ibv_ctx.mutex = CreateMutex(NULL, FALSE, NULL);
- if (!context->ibv_ctx.mutex)
-  goto err_ctx_mutex;
-
  if (cl_spinlock_init(&context->uar_lock))
   goto err_uar_spinlock;
 
@@ -93,8 +89,6 @@
 err_bf_spinlock:
  cl_spinlock_destroy(&context->uar_lock);
 err_uar_spinlock:
- CloseHandle(context->ibv_ctx.mutex);
-err_ctx_mutex:
  CloseHandle(context->db_list_mutex);
 err_db_mutex:
 #ifdef XRC_SUPPORT
@@ -168,7 +162,6 @@
 
  cl_spinlock_destroy(&context->bf_lock);
  cl_spinlock_destroy(&context->uar_lock);
- CloseHandle(context->ibv_ctx.mutex);
  CloseHandle(context->db_list_mutex);
 #ifdef XRC_SUPPORT
  CloseHandle(context->xrc_srq_table_mutex);
Index: hw/mlx4/user/hca/verbs.h
===================================================================
--- hw/mlx4/user/hca/verbs.h (revision 1521)
+++ hw/mlx4/user/hca/verbs.h (working copy)
@@ -210,7 +210,6 @@
 
 struct ibv_context {
  int    page_size;
- pthread_mutex_t mutex;
 };
 
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080827/dc092664/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clean_context.patch
Type: application/octet-stream
Size: 1254 bytes
Desc: clean_context.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080827/dc092664/attachment.obj>


More information about the ofw mailing list