On Wednesday 07 February 2007 4:25 am, Oliver Neukum wrote: > 1. Disallow any padding > 2. Assume the structure may be in unaligned memory > > Issue number #1 is usually handled by the USB specification.
Key word "usually"; they haven't AFAIK promised to do so. > #2 is not. Therefore packed data structures will make inferior code > even in the case we alloc the data structure ourselves. That case is the by far the exception. On the host side, descriptors are normally processed straight out of the buffer they were delivered into, as laid out by the peripheral. On the peripheral side, they're written at most once during setup (and only a few fields need system-specific values). Are you honestly suggesting the performance impact of this could posssibly outweigh the maintainence nightmare of needing to explicitly code unaligned access into all the kernel and userspace code that touches descriptor fields? ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel