Download raw body.
uncm(4): process all notifications in one interrupt transfer
uncm(4): process all notifications in one interrupt transfer
uncm(4): process all notifications in one interrupt transfer
Chris Cappuccio <chris@nmedia.net> wrote: > Stefan Sperling [stsp@stsp.name] wrote: > > > > Could we copy these messages out of sc_intr_msg into another variable > > of struct usb_cdc_notification type with memcpy() after checking sizes? > > > > We must avoid unaligned access on some platforms OpenBSD supports. Just > > casting a uint8_t * type to a struct * type could make us end up in ddb > > on such platforms if the device doesn't align its messages as expected > > by the platform. > > > > I realize this makes the driver slower and we're already copying data from > > and to USB transfers. But complicated message framing like this has a cost. > > > > there's always __STRICT_ALIGNMENT so network drivers can choose an > optimal path > > #ifdef __STRICT_ALIGNMENT > copies > #else > maybe less copies > #endif > Please don't do that. The code in the #ifdef will rot.
uncm(4): process all notifications in one interrupt transfer
uncm(4): process all notifications in one interrupt transfer
uncm(4): process all notifications in one interrupt transfer