[Openib-windows] RE: [PATCH] query_ca
Fabian Tillier
ftillier at silverstorm.com
Wed Nov 2 14:28:03 PST 2005
Hi Yossi,
I just committed this. Let me know if you run into any problems with it.
Thanks,
- Fab
On 10/27/05, Fab Tillier <ftillier at silverstorm.com> wrote:
> 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)
> {
More information about the ofw
mailing list