[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Little help with blk ring



On Tue, May 22, 2012 at 8:53 AM, James Harper
<james.harper@xxxxxxxxxxxxxxxx> wrote:
>> I have done this, and they are in fact identical. Here are the addresses of 
>> the
>> fields...
>> RING at 0x0009a040
>> 0x0009a04a status:0
>> 0x0009a048 operation 0
>> 0x0009a040 id:256
>>
>> What else could it be?
>>
>
> Is sizeof() what you expect it to be? That would cause the first request to 
> be (mostly) okay, but subsequent requests to be further and further out of 
> alignment.

Right on the spot!
Here is the output of sizeof for the struct and for each member:
SIZEOF ring_res:12 id:8 operation:1 status:2
There is seems to be an alignment problem, them sum of members is 11,
but the whole struct is 12, the question now is, how can I tackle this
problem?

Daniel
>
> James



-- 
+-=====---------------------------+
| +---------------------------------+ | This space intentionally blank
for notetaking.
| |   | Daniel Castro,                |
| |   | Consultant/Programmer.|
| |   | U Andes                         |
+-------------------------------------+

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.