Re: [PATCH v2 1/1] IB/mlx4: Unaligned access in send_reply_to_slave

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 17, 2016 at 11:07:33AM -0600, Jason Gunthorpe wrote:
> On Tue, May 17, 2016 at 11:37:11AM +0300, Shamir Rabinovitch wrote:
> 
> > Comments are more then welcome..
> 
> Something like this should fix it with less overhead:
> 
> struct ib_sa_mcmember_data {
> [..]
> } __packed __aligned(4);
> 
> Which tells the compiler the structure is only aligned on dword
> boundaries. It will then emit the proper architecture dependent
> unaligned read for the 8 byte values.
> 
> Jason

Thanks Jason. I considered to un-optimize this memcp line but
your idea is more clean. Gave quick look on the assembly and
it seems that you are correct. I could not find the 'ldx' around
the location where I had the memcpy. I do full test with this 
kernel hope it could confirm the fix. If all well I will re post
the updated patch to mailing list.

BR, Shamir

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux