On Thu, Dec 12, 2019 at 11:37:46AM +0200, Leon Romanovsky wrote: > +#define IBA_FIELD64_LOC(field_struct, byte_offset, num_bits) \ > + field_struct, (byte_offset)&0xFFF8, \ > + GENMASK_ULL(63 - (((byte_offset) % 8) * 8), \ > + 63 - (((byte_offset) % 8) * 8) - (num_bits - 1)), \ > + 64 This doesn't quite work out right, the 64 bit fields are not naturally aligned and we never extract anything other than 64 bits from them. So as written this one: #define CM_SIDR_REP_SERVICEID CM_FIELD64_LOC(struct cm_sidr_rep_msg, 12, 64) Gives a compilation failure. Should be #define IBA_FIELD64_LOC(field_struct, byte_offset) \ field_struct, (byte_offset)&0xFFF8, GENMASK_ULL(63, 0), 64 As we rely on the get_unaligned() to safely retrieve the 64 bits. Jason