From: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
To: Bart Van Assche <Bart.VanAssche-Sjgp3cTcYWE@public.gmane.org>
Cc: "matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
<matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
<monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC PATCH] rxe: Fix structure layouts for 32/64 bit compat
Date: Wed, 7 Feb 2018 16:57:25 -0700 [thread overview]
Message-ID: <20180207235725.GA9080@ziepe.ca> (raw)
In-Reply-To: <1518047664.2870.82.camel-Sjgp3cTcYWE@public.gmane.org>
On Wed, Feb 07, 2018 at 11:54:25PM +0000, Bart Van Assche wrote:
> On Wed, 2018-02-07 at 16:41 -0700, Jason Gunthorpe wrote:
> > diff --git a/include/uapi/rdma/rdma_user_rxe.h b/include/uapi/rdma/rdma_user_rxe.h
> > index e3e6852b58eb45..b501deb18d8184 100644
> > +++ b/include/uapi/rdma/rdma_user_rxe.h
> > @@ -58,6 +58,8 @@ struct rxe_global_route {
> > struct rxe_av {
> > __u8 port_num;
> > __u8 network_type;
> > + __u16 reserved1;
> > + __u32 reserved2;
>
> Hello Jason,
>
> Seeing two consecutive reserved members is a bit weird. Have you considered
> to use something like __u8 reserved[6] instead?
Ah, I had that originally but changed it to make pahole work properly..
Can switch it back.
Although, this does really firmly say what the alighment is, eg
down the road someone might be tempted to do:
- __u8 reserved[6];
+ __u32 new_value;
+ __u16 reserved;
Which would be quite wrong..
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-02-07 23:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 23:41 [RFC PATCH] rxe: Fix structure layouts for 32/64 bit compat Jason Gunthorpe
[not found] ` <20180207234153.GA14067-uk2M96/98Pc@public.gmane.org>
2018-02-07 23:54 ` Bart Van Assche
[not found] ` <1518047664.2870.82.camel-Sjgp3cTcYWE@public.gmane.org>
2018-02-07 23:57 ` Jason Gunthorpe [this message]
[not found] ` <20180207235725.GA9080-uk2M96/98Pc@public.gmane.org>
2018-02-08 0:01 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180207235725.GA9080@ziepe.ca \
--to=jgg-uk2m96/98pc@public.gmane.org \
--cc=Bart.VanAssche-Sjgp3cTcYWE@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).