[Openib-windows] RE: [PATCH] query_ca
Fab Tillier
ftillier at silverstorm.com
Thu Oct 27 10:42:16 PDT 2005
Hi Yossi,
> -----Original Message-----
> From: Yossi Leybovich [mailto:sleybo at mellanox.co.il]
> Sent: Thursday, October 20, 2005 10:18 AM
>
> Fab
> inorder to support AV with GRH we still need to copy the ca attr and update
> the internal pointers in the struct
> here is patch for that
You're right, a straight memcpy doesn't work due to the embedded pointers.
There's a function exported by IBAL, ib_copy_ca_attr that does this copy
properly so there's no need to duplicate the functionality.
Here's what I'm proposing for a change. Let me know if this works for you or
not. I've tested that it builds properly.
Thanks,
- Fab
Index: hw/mt23108/user/mlnx_ual_ca.c
===================================================================
--- hw/mt23108/user/mlnx_ual_ca.c (revision 127)
+++ hw/mt23108/user/mlnx_ual_ca.c (working copy)
@@ -200,8 +200,9 @@
if ( ioctl_status == IB_SUCCESS && p_ca_attr &&
byte_count && !h_uvp_ca->p_hca_attr )
{
+ CL_ASSERT( byte_count >= p_ca_attr->size );
h_uvp_ca->p_hca_attr = p_umv_buf->p_inout_buf;
- cl_memcpy(h_uvp_ca->p_hca_attr, p_ca_attr, byte_count);
+ ib_copy_ca_attr( h_uvp_ca->p_hca_attr, p_ca_attr );
}
else if (p_umv_buf->p_inout_buf)
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: query_ca.patch
Type: application/octet-stream
Size: 573 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20051027/3941289c/attachment.obj>
More information about the ofw
mailing list