kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: ydroneaud@opteya.com (Yann Droneaud)
To: kernelnewbies@lists.kernelnewbies.org
Subject: struct nbd_reply not packed => trouble?
Date: Tue, 15 Jan 2013 10:59:05 +0100	[thread overview]
Message-ID: <1358243945.3741.5.camel@dworkin.quest-ce.net> (raw)
In-Reply-To: <BLU402-EAS225E36389A451EE865494DCBC2D0@phx.gbl>

Hi,

Le mardi 15 janvier 2013 ? 07:59 +0800, ??? a ?crit :
> 
> ? 2013-1-11?0:42?"Yann Droneaud" <ydroneaud@opteya.com> ???

> >>  - Any ideas for a platform where you would expect struct nbd_reply to
> >>    be other than 4 + 4 + 8 = 16 bytes in size?
> > 
> > Look for an ABI that require 'char' with either property:
> > - size > 1 byte
> > - alignment > 8 (16 bytes !)
> > 
> > 
> 
>       Do you mean this structure size will vary on different platform? If yes, why Linux does not packed here? Thanks
> 

There's probably no such architecture for a general purpose processor
with the ABI properties I've mentionned. eg. (sizeof(char) > 1 ||
alignof(char) > 8).

And if one day Linux is going to be ported on such target, the packing
of the nbd_reply struct will be the smallest problem to fix.

Regards

-- 
Yann Droneaud
OPTEYA

      reply	other threads:[~2013-01-15  9:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10 16:09 struct nbd_reply not packed => trouble? Sebastian Pipping
2013-01-10 16:36 ` Yann Droneaud
2013-01-13 16:45   ` Sebastian Pipping
2013-01-14 23:59   ` 卜弋天
2013-01-15  9:59     ` Yann Droneaud [this message]

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=1358243945.3741.5.camel@dworkin.quest-ce.net \
    --to=ydroneaud@opteya.com \
    --cc=kernelnewbies@lists.kernelnewbies.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).