[openib-general] [librdmacm] a question about the cma code

Michael S. Tsirkin mst at mellanox.co.il
Tue Aug 8 10:05:28 PDT 2006


Quoting r. Sean Hefty <mshefty at ichips.intel.com>:
> Subject: Re: [librdmacm] a question about the cma code
> 
> Dotan Barak wrote:
> >         if (src->private_data && src->private_data_len) {
> >                 memcpy(dst->private_data, src->private_data,
> >                        src->private_data_len);
> >                 dst->private_data_len = src->private_data_len;
> >         } else
> >                 src->private_data_len = 0;
> > }
> > 
> > What is the purpose of the following code line:
> >  src->private_data_len = 0;
> 
> That's a bug.  I just committed a fix to set dst->private_data_len = 0 instead.

Isn't the whole command memset to 0 before hand?
Maybe just remove the line?

-- 
MST




More information about the general mailing list