All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@suse.de>
To: Jan Beulich <jbeulich@novell.com>
Cc: Xen devel list <xen-devel@lists.xensource.com>
Subject: Re: [patch/rfc] multiprotocol blkback drivers (32-on-64)
Date: Tue, 19 Dec 2006 09:35:54 +0100	[thread overview]
Message-ID: <4587A46A.9010404@suse.de> (raw)
In-Reply-To: <4587A90C.76E4.0078.0@novell.com>

Jan Beulich wrote:
> There are a couple of things I'd like to see changed if this is what we want to
> go with:

yep, it's a first at least partly working rfc patch, certainly not final
yet ;)

> - "if (protocol == 1) {} else {}" should be switches, failing (or even BUGing) for
>   all protocol versions other than 1 and 2

BUG() should be ok, in theory the code should never ever reach one of
the switches with an uninitialized protocol.

> - assuming the abstraction is meant to scale to future protocol versions, adding
>   many such explicit version handling code paths seems undesirable, as seems
>   adding extra version specific variables or (non-union) structure members

Using unions is one of the things I plan to change.

> - using all error possible values returned from xenbus_gather to indicate an old
>   frontend seems odd at least - one specific error value should be
>   recognized here

Yep, would be a bit cleaner, although I don't see any other possible
reason than a nonexisting node why it should fail at that point ...

> - unconditionally using #pragma pack(), __attribute__(()), and __i386__ or
>   __x86_64__ in public Xen headers is, in my opinion, a no-go (these header
>   should all be suitable for building e.g. Windows drivers, too - I know this isn't
>   generally the case at present, but I don't think anything else can be the goal,
>   and hence the situation shouldn't be made worse)

Yep, we need some solution for that.  The sun folks will veto at least
the attribute stuff too.  Not sure pragma pack is a portability issue.
I think we need some compiler.h which provides that kind of stuff, i.e.

#ifdef __GNUC__
#define __align8__ __attribute__((__aligned__(8)))
#endif

#ifdef __suncc__
#define __align8__ something_else
#endif

Also some of the bits I've placed into blkif.h for now should go to a
linux-kernel header instead I think.

cheers,
  Gerd

-- 
Gerd Hoffmann <kraxel@suse.de>

  reply	other threads:[~2006-12-19  8:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-18 16:39 [patch/rfc] multiprotocol blkback drivers (32-on-64) Gerd Hoffmann
2006-12-18 17:09 ` Jan Beulich
2006-12-18 17:58   ` Keir Fraser
2006-12-19  7:37     ` Jan Beulich
2006-12-19  8:20   ` Gerd Hoffmann
2006-12-19  7:55 ` Jan Beulich
2006-12-19  8:35   ` Gerd Hoffmann [this message]
2006-12-19 13:32   ` Gerd Hoffmann
2006-12-19 14:20     ` Keir Fraser
2006-12-20 15:12       ` Gerd Hoffmann
2006-12-20 15:47         ` Jan Beulich
2006-12-20 16:07           ` Keir Fraser

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=4587A46A.9010404@suse.de \
    --to=kraxel@suse.de \
    --cc=jbeulich@novell.com \
    --cc=xen-devel@lists.xensource.com \
    /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.