public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: "Weiny, Ira" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org"
	<roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 4/5] ib/mad: add new ioctl to user space to support new registration options
Date: Wed, 7 May 2014 09:28:23 -0600	[thread overview]
Message-ID: <20140507152823.GA20689@obsidianresearch.com> (raw)
In-Reply-To: <2807E5FD2F6FDA4886F6618EAC48510E04B82CCF-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Wed, May 07, 2014 at 02:39:26PM +0000, Weiny, Ira wrote:
> > On Mon, May 05, 2014 at 09:44:49PM -0400, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
> > 
> > > +struct ib_user_mad_reg_req2 {
> > > +	__u32	id;
> > > +	__u32	qpn;
> > > +	__u8	mgmt_class;
> > > +	__u8	mgmt_class_version;
> > > +	__u16   res;
> > > +	__u32   flags;
> > > +	__u64   method_mask[2];
> > > +	__u8    oui[3]; /* network order */
> > > +	__u8	rmpp_version;
> > > +};
> > 
> > Please make the padding on 64 bit explicit so we don't have weird problems
> > mixing 32 and 64 bit code.
> 
> Just to be clear you mean to add a __u32 reserved field to the end of this struct?

I think that is enough, yes. Yann has been using pahole to investigate
these issues.


> > Similar comment as for userspace using a host order uint for the oui.
> 
> Ok would you prefer changing this to __u32 and specifying in host order?  Then adjust the padding, like this:
> 
> __u32 oui;
> _u8 rmpp_version;
> _u8 res[3];
> 
> To complete the changes?

s/res/reserved/

Sure, that seems simpler for all involved. 

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

  parent reply	other threads:[~2014-05-07 15:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06  1:44 [PATCH RESEND 0/5] ib/mad: Add ability for user space applications to control RMPP directly ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found] ` <1399340690-27677-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-05-06  1:44   ` [PATCH 1/5] ib/umad: update module to pr_* style print messages ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2014-05-06  1:44   ` [PATCH 2/5] ib/mad: " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1399340690-27677-3-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-05-06  2:53       ` Jason Gunthorpe
     [not found]         ` <20140506025356.GB2307-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-05-07 14:30           ` Weiny, Ira
     [not found]             ` <2807E5FD2F6FDA4886F6618EAC48510E04B82C73-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-05-07 15:32               ` Jason Gunthorpe
2014-05-06  1:44   ` [PATCH 3/5] ib/mad: Add pr_notice messages for various umad/mad registration failures ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1399340690-27677-4-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-05-06  2:57       ` Jason Gunthorpe
     [not found]         ` <20140506025714.GC2307-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-05-07 14:35           ` Weiny, Ira
2014-05-06  1:44   ` [PATCH 4/5] ib/mad: add new ioctl to user space to support new registration options ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1399340690-27677-5-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-05-06  3:04       ` Jason Gunthorpe
     [not found]         ` <20140506030441.GD2307-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-05-07 14:39           ` Weiny, Ira
     [not found]             ` <2807E5FD2F6FDA4886F6618EAC48510E04B82CCF-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-05-07 15:28               ` Jason Gunthorpe [this message]
2014-05-06  1:44   ` [PATCH 5/5] ib/mad: Add user space RMPP support ira.weiny-ral2JQCrhuEAvxtiuMwx3w

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=20140507152823.GA20689@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@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