[ofa-general] ib_umad method mask problems on big-endian 64-bit archs
sashak at voltaire.com
Thu Aug 30 07:35:47 PDT 2007
On 19:50 Wed 29 Aug , Roland Dreier wrote:
> > It looks that using uint32_t for addr in set_bit() function is sufficient
> > fix. But for ppc64 this means that new OpenSM will break with old
> > kernels, probably we will need to put some ugly #ifdef in
> > osm_vendor_ibumad.c...
> Yes, that's a pain. Another possibility is to declare that the
> declaration of the registration request should have been
> long method_mask[16 / sizeof (long)];
> and just add a compat_ioctl method to the ib_umad module to handle the
> broken case of 32-bit big endian userspace on a 64-bit kernel.
> However that breaks 64-bit big endian userspace that followed the old
> ib_user_mad.h file correctly so overall I'm leaning towards the patch
> I already posted.
> What do you think?
Under management tree only osm_vendor_ibumad.c actually uses method_mask,
so switching to long in struct ib_user_mad_reg_req will break nothing
Do we have another another user_umad users (OFA or another known, where
switch could be painful)? If not, I will prefer this way instead of
keeping two OpenSMs for ppc64.
More information about the general