Subject: Re: CVS commit: src/sys/dev/ic
To: None <christianbiere@gmx.de>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: source-changes
Date: 10/29/2006 23:24:57
christianbiere@gmx.deさん wrote:

> On ARM (at least with GCC) sizeof (struct example) won't be 2.

In your example it requires packed.
In re(4) case it doesn't (currently) so we don't bother to add it.
That's all.

> > The offsets of descriptor members are specified by hardware design
> > of bus-master, so you can't pad it.
> 
> I'm not sure how you mean that.

The busmaster reads host's memory via DMA.
The read addresses are spcified by busmaster hardware.
The structure is used to represent the offsets.
On some hardware, such offsets or addresses could be programmed,
but it could not on others.

> Since this struct rtx_desc is not
> used in many places and you need endian-conversion anyway, I would
> suggest using accessor functions instead of this struct.

I can't see any benefits by using such functions.
---
Izumi Tsutsui