From: Christian Lamparter <chunkeey@xxxxxxxxxxxxxx> Date: Wed, 22 Sep 2010 20:54:05 +0200 > Only the structs which deal with hardware (hw.h, eeprom.h, wlan.h) > or firmware (fwcmd.h, fwdesc.h & wlan.h) interface have the > __packed attribute. And there are several good reasons. There is a cost in being lazy and just stabbing __packed to every structure shared with firmware or hardware. And that cost is that every larger-than-byte sized element will be loaded with a disgustingly expensive series of byte loads, shifts, and masks. Every access. This is because GCC is not allowed to assume the alignment of any structure marked with __packed. Therefore only byte sized loads are safe on architectures that require types be aligned to their size. This really is a performance issue, otherwise I frankly wouldn't care where you put __packed. So please minimize the annotations to only the structures that actually require __packed, not those that "might." -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html