[Openib-windows] [PATCH] mad with GRH valid

Yossi Leybovich sleybo at mellanox.co.il
Mon Apr 3 05:51:52 PDT 2006


Fab 
 
While debuging problems with new mthca,
we found that ib_get_mad create p_mad struct with p_mad_buf and p_grh
which points to the same address.
(the assert we add was fired)
 
ual_mgr.c line 879 
"..... 
if( p_mad )
  {
   /* Save off the pointers since the proxy overwrites the element. */
   p_mad_buf = p_mad->p_mad_buf;
   p_grh = p_mad->p_grh;
   CL_ASSERT((VOID *)p_mad_buf != (VOID *)p_grh);
   
 
   ioctl_buf.in.p_mad_buf = p_mad_buf;
   ioctl_buf.in.p_grh = p_grh;
  } 
....."

This cause the kernel to copy the GRH data on the mad data and the mad
droped by the OpenSM
 
this patch fix the problem:
pls review
 
10x
Yossi 
 
Index: W:/work/clean/core/al/user/al_mad_pool.c
===================================================================
--- W:/work/clean/core/al/user/al_mad_pool.c (revision 1216)
+++ W:/work/clean/core/al/user/al_mad_pool.c (revision 1217)
@@ -854,7 +854,7 @@
 
  /* Initialize grh */
  p_al_mad_element->element.p_grh =
-  (ib_grh_t*)(uintn_t)p_al_mad_element->mad_ds.vaddr;
+  (ib_grh_t*)(uintn_t)p_al_mad_element->grh_ds.vaddr;
 }
 
 




More information about the ofw mailing list