Index | Thread | Search

From:
Chris Cappuccio <chris@nmedia.net>
Subject:
Re: uncm(4): process all notifications in one interrupt transfer
To:
Mikolaj Kucharski <mikolaj@kucharski.name>, tech@openbsd.org, Jan Schreiber <jes@posteo.de>
Date:
Mon, 12 Oct 2026 06:55:55 -0700

Download raw body.

Thread
  • Chris Cappuccio:

    uncm(4): process all notifications in one interrupt transfer

  • David Gwynne:

    uncm(4): process all notifications in one interrupt transfer

  • 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
    
    
  • Chris Cappuccio:

    uncm(4): process all notifications in one interrupt transfer

  • David Gwynne:

    uncm(4): process all notifications in one interrupt transfer