On Mon, Mar 25, 2019 at 06:10:34PM +0100, Bernard Metzler wrote: > Signed-off-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx> > --- > drivers/infiniband/sw/siw/iwarp.h | 369 ++++++++++++++++++++++++++++++ > 1 file changed, 369 insertions(+) > create mode 100644 drivers/infiniband/sw/siw/iwarp.h > > diff --git a/drivers/infiniband/sw/siw/iwarp.h b/drivers/infiniband/sw/siw/iwarp.h > new file mode 100644 > index 000000000000..5f12806e9109 > --- /dev/null > +++ b/drivers/infiniband/sw/siw/iwarp.h > @@ -0,0 +1,369 @@ > +/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */ > + > +/* Authors: Bernard Metzler <bmt@xxxxxxxxxxxxxx> */ > +/* Copyright (c) 2008-2019, IBM Corporation */ > + > +#ifndef _IWARP_H > +#define _IWARP_H > + > +#include <rdma/rdma_user_cm.h> /* RDMA_MAX_PRIVATE_DATA */ > +#include <linux/types.h> > +#include <asm/byteorder.h> <...> > +struct iwarp_terminate { > + struct iwarp_ctrl ctrl; > + __be32 rsvd; > + __be32 ddp_qn; > + __be32 ddp_msn; > + __be32 ddp_mo; > +#if defined(__LITTLE_ENDIAN_BITFIELD) > + __u16 layer : 4, etype : 4, ecode : 8; > + __u16 flag_m : 1, flag_d : 1, flag_r : 1, reserved : 13; > +#elif defined(__BIG_ENDIAN_BITFIELD) > + __u16 etype : 4, layer : 4, ecode : 8; > + __u16 reserved : 13, flag_r : 1, flag_d : 1, flag_m : 1; > +#else > +#error "undefined byte order" > +#endif I would expect different layout in struct above. #if defined(__LITTLE_ENDIAN_BITFIELD) __u16 layer : 4, etype : 4, ecode : 8; __u16 flag_m : 1, flag_d : 1, flag_r : 1, reserved : 13; #elif defined(__BIG_ENDIAN_BITFIELD) __u16 ecode : 8, etype : 4, layer : 4; __u16 reserved : 13, flag_r : 1, flag_d : 1, flag_m : 1; .... Thanks
Attachment:
signature.asc
Description: PGP signature