-----"Doug Ledford" <dledford@xxxxxxxxxx> wrote: ----- >To: "Bernard Metzler" <BMT@xxxxxxxxxxxxxx>, "Jason Gunthorpe" ><jgg@xxxxxxxx> >From: "Doug Ledford" <dledford@xxxxxxxxxx> >Date: 08/07/2019 08:53PM >Cc: linux-rdma@xxxxxxxxxxxxxxx >Subject: [EXTERNAL] Re: Re: [PATCH 1/1] Make user mmapped CQ arming >flags field 32 bit size to remove 64 bit architecture dependency of >siw. > >On Wed, 2019-08-07 at 17:49 +0000, Bernard Metzler wrote: >> >> It hurts, but I did finally setup qemu with a ppc image to check, >> and so you are right! >> >> ... >> >> #ifdef __BIG_ENDIAN__ >> >> seem to be available in both kernel and user land... >> >> But, general question: siw in its current shape isn't out >> for long, older versions from github are already broken with >> the abi. So, silently changing the abi at this stage of siw >> deployment is no option? It's a hassle to see an old mistake >> carried along forever with that #ifdef statement...no? > >I was thinking about that myself. > >This really hasn't been out long enough to completely tie our hands >here. A point update to rdma-core will resolve any user side issues. > What we are aiming at is ensuring backward compatibility for 64bit-BE architectures, which are using siw since this year. The community is likely of size zero. I found it hard to find a machine, even in the ppc world, which let me test that BE thing. I ended up with an emulator. So I assume it is no real world issue to now just change the 64bits flag into 32bits and add a 32bit pad for ABI compliance. At the other hand, the change would be marginal (but awkward!): diff --git a/include/uapi/rdma/siw-abi.h b/include/uapi/rdma/siw-abi.h index af735f55b291..162b861ad2ac 100644 --- a/include/uapi/rdma/siw-abi.h +++ b/include/uapi/rdma/siw-abi.h @@ -180,7 +180,12 @@ struct siw_cqe { * to control CQ arming. */ struct siw_cq_ctrl { +#ifdef __BIG_ENDIAN__ + __u32 pad; + __u32 flags; +#else __u32 flags; __u32 pad; +#endif }; #endif I propose taking my initial patch (w/o conditional endianess code). But I can live with the ugly. Let me know. In any case, I will make a PR for the user lib, since we changed the variable to 32 bits... Thanks Bernard. >Are they doing stable kernel patches for the last kernel? If so, we >can >fix it both places. No distros have picked up the original ABI in >this >short of a window and managed to get it into a shipped product, so we >can notify any that might have picked up the broken version and get >that >updated too if we don't dilly dally and make the call quickly. > >-- >Doug Ledford <dledford@xxxxxxxxxx> > GPG KeyID: B826A3330E572FDD > Fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD > [attachment "signature.asc" removed by Bernard Metzler/Zurich/IBM]