All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>,
	Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
Subject: Re: [RFC 4/12] ib-mgmt: Add basic SM definitions to umad
Date: Sat, 23 Oct 2010 20:27:31 -0600	[thread overview]
Message-ID: <20101024022731.GA842@obsidianresearch.com> (raw)
In-Reply-To: <CF9C39F99A89134C9CF9C4CCB68B8DDF25B809B7F3-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Sat, Oct 23, 2010 at 12:03:18AM -0700, Hefty, Sean wrote:

> +struct umad_smp {
> +	uint8_t	 base_version;
> +	uint8_t	 mgmt_class;
> +	uint8_t	 class_version;
> +	uint8_t	 method;
> +	uint16_t status;
> +	uint8_t  hop_ptr;
> +	uint8_t  hop_cnt;
> +	uint64_t tid;
> +	uint16_t attr_id;
> +	uint16_t resv;
> +	uint32_t attr_mod;
> +	uint64_t mkey;

These uint64_t's should also be the special 64 bit type I mentioned
before. The problem here is that uint64_t increases the alignment
requirement of the struct to 8, while its natural place, in say, an IB
packet (LRH+BTH+DETH+SMP) only has an alignment of 4.

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:[~2010-10-24  2:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-23  6:48 [RFC 0/12] ib-mgmt: port madeye to user space Hefty, Sean
     [not found] ` <CF9C39F99A89134C9CF9C4CCB68B8DDF25B809B7EE-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-10-23  6:51   ` [RFC 1/12] IB/mgmt: Add API to register for MAD snooping Hefty, Sean
2010-10-23  7:00   ` [RFC 2/12] ib-mgmt: provide MAD definitions with libibumad Hefty, Sean
     [not found]     ` <CF9C39F99A89134C9CF9C4CCB68B8DDF25B809B7F1-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-10-23 19:06       ` Jason Gunthorpe
     [not found]         ` <20101023190601.GA10883-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-10-24  2:01           ` Hefty, Sean
2010-10-23  7:02   ` [RFC 3/12] ib-mgmt: add SA MAD definitions to umad Hefty, Sean
     [not found]     ` <CF9C39F99A89134C9CF9C4CCB68B8DDF25B809B7F2-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-10-23 19:08       ` Jason Gunthorpe
2010-10-23  7:03   ` [RFC 4/12] ib-mgmt: Add basic SM " Hefty, Sean
     [not found]     ` <CF9C39F99A89134C9CF9C4CCB68B8DDF25B809B7F3-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-10-24  2:27       ` Jason Gunthorpe [this message]
2010-10-23  7:04   ` [RFC 5/12]ib-mgmt: add CM " Hefty, Sean
2010-10-23  7:06   ` [RFC 6/12] ib-mgmt: add new umad header files to release Hefty, Sean
2010-10-23  7:07   ` [RFC 7/12] ib-mgmt: update mad.h to use umad_types.h Hefty, Sean
2010-10-23  7:09   ` [RFC 8/12] ib-mgmt: fix trace table response Hefty, Sean
2010-10-23  7:10   ` [RFC 9/12] ib-mgmt: convert ib_types.h to use umad types Hefty, Sean
2010-10-23  7:11   ` [RFC 10/12] ib-mgmt: remove duplicate definition of IB_MAD_STATUS_CLASS_MASK Hefty, Sean
2010-10-23  7:12   ` [RFC 11/12] ib-mgmt: move ntohll/htonll from mad.h to umad.h Hefty, Sean
     [not found]     ` <CF9C39F99A89134C9CF9C4CCB68B8DDF25B809B7FB-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-10-23 19:12       ` Jason Gunthorpe
2010-10-23  7:17   ` [RFC 12/12] ib-mgmt/diags: add utility to display snooped mads Hefty, Sean

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=20101024022731.GA842@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=weiny2-i2BcT+NCU+M@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.