WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xen vbd: better.

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] xen vbd: better.
From: "Ronald G. Minnich" <rminnich@xxxxxxxx>
Date: Fri, 22 Oct 2004 13:15:02 -0600 (MDT)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 22 Oct 2004 20:21:01 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: <E1CL4lv-0006wL-00@xxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <E1CL4lv-0006wL-00@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx

On Fri, 22 Oct 2004, Keir Fraser wrote:

> I'm interested to know how. How do you define a network header layout,
> for example, and how do you access subfields? e.g., is there an
> explicit IDL with integration into the compiler?

it's the old fashioned way. You pack and unpack from an array of unsigned
chars. It sounds painful, but there's so little of it needed that it
really doesn't matter much. In 15 years of working on this kernel nobody
has ever felt the need, and although they did end up adding __packed__
into the compiler in some form, they hated it for practical and esthetic
reasons; hence its use is "deprecated". The kernel functions that do the
pack/unpack are tiny and have not changed in forever.

Having done this both way myself many times, I'd have to come down right
on the middle of the fence. Yah, having the compiler pack is nice.  No,
it's actually not foolproof in all cases on all compilers for all time --
so it's out there waiting to bite you. And, the 'unpack it yourself' is in
actual practice more portable -- at least that's how it's been for me
(well, and many others).  Weird but true.

There's a lot of interesting philosophical arguments to be made on either 
side, I'm just reporting them. Having solved my problems (almost) with 
the vbd, I'm going to move along now :-) 

[VBD reported size still makes no sense at all]


ron


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>