On Sun, Mar 03, 2019 at 01:20:47PM +0000, Bernard Metzler wrote: > > >To: "Jason Gunthorpe" <jgg@xxxxxxxx> > >From: "Bernard Metzler" > >Sent by: linux-rdma-owner@xxxxxxxxxxxxxxx > >Date: 02/27/2019 02:50PM > >Cc: linux-rdma@xxxxxxxxxxxxxxx > >Subject: Re: [PATCH v5 01/13] iWarp wire packet format > > > > > >>To: "Bernard Metzler" <bmt@xxxxxxxxxxxxxx> > >>From: "Jason Gunthorpe" <jgg@xxxxxxxx> > >>Date: 02/22/2019 12:58AM > >>Cc: linux-rdma@xxxxxxxxxxxxxxx > >>Subject: Re: [PATCH v5 01/13] iWarp wire packet format > >> > >>On Tue, Feb 19, 2019 at 11:08:51AM +0100, Bernard Metzler wrote: > >>> +/* > >>> + * DDP/RDMAP Hdr bits & fields > >>> + */ > >>> +enum { > >>> + DDP_FLAG_TAGGED = cpu_to_be16(0x8000), > >>> + DDP_FLAG_LAST = cpu_to_be16(0x4000), > >>> + DDP_MASK_RESERVED = cpu_to_be16(0x3C00), > >>> + DDP_MASK_VERSION = cpu_to_be16(0x0300), > >>> + RDMAP_MASK_VERSION = cpu_to_be16(0x00C0), > >>> + RDMAP_MASK_RESERVED = cpu_to_be16(0x0030), > >>> + RDMAP_MASK_OPCODE = cpu_to_be16(0x000f) > >>> +}; > >>> + > >>> +static inline u8 __ddp_version(struct iwarp_ctrl *ctrl) > >>> +{ > >>> + return (u8)(be16_to_cpu(ctrl->ddp_rdmap_ctrl & DDP_MASK_VERSION) > >>>> 8); > >>> +}; > >> > >>Is this driver sprase clean for endian-ness conversions? > > > >I think so, I checked for PPC <-> x86 I mean, did you run the sparse tool? Jason