Home
last modified time | relevance | path

Searched hist:ff4323418bf46b3dfb4d744d5626e2aa09935c98 (Results 1 – 1 of 1) sorted by relevance

/freebsd/sys/net/
H A Dif_llc.hdiff ff4323418bf46b3dfb4d744d5626e2aa09935c98 Fri Dec 01 18:50:11 CET 2006 Warner Losh <imp@FreeBSD.org> Move the __packed declarations. This makes sizeof(struct llc) 8 again
on the arm. Add an assert to ensure that the size is 8 to prefent others
from falling into this trap (we should have more of these).

Why the construct:

struct foo {
union bar {
struct {
...
} __packed fred;
...
} __packed wilma;
} __packed;

has a different packing than:

struct foo {
union bar {
struct {
...
} fred __packed;
...
} wilma __packed;
} __packed;

is beyond my ability to ferret out of the gcc documentation. Most
likely some subtle binding issue (eg before it says the struct itself
is packed, while after it means that the whole struct is packed into
the thing it is in). Pointers to relevant documentation would be
appreciated.
diff ff4323418bf46b3dfb4d744d5626e2aa09935c98 Fri Dec 01 18:50:11 CET 2006 Warner Losh <imp@FreeBSD.org> Move the __packed declarations. This makes sizeof(struct llc) 8 again
on the arm. Add an assert to ensure that the size is 8 to prefent others
from falling into this trap (we should have more of these).

Why the construct:

struct foo {
union bar {
struct {
...
} __packed fred;
...
} __packed wilma;
} __packed;

has a different packing than:

struct foo {
union bar {
struct {
...
} fred __packed;
...
} wilma __packed;
} __packed;

is beyond my ability to ferret out of the gcc documentation. Most
likely some subtle binding issue (eg before it says the struct itself
is packed, while after it means that the whole struct is packed into
the thing it is in). Pointers to relevant documentation would be
appreciated.