Skip to content

Zerocopy support #3180

@rhgndf

Description

@rhgndf

Related area

Avoids memcpy with calling write functions

Hardware specification

Probably applicable to all hardware, user probably needs to be careful in only passing DMA capable buffer

Is your feature request related to a problem?

Streaming on webusb vendor endpoint as fast as possible

The speed jumped from 10MB/s to 26.5MB/s with the modification below.
Hardware details: CH32V305, USBHS, CFG_TUD_VENDOR_EPSIZE=512

Describe the solution you'd like

Current solution as a proof of concept:

Within this piece of code:

memcpy(s->ep_buf, buffer, xact_len);

I replaced it with

    //memcpy(s->ep_buf, buffer, xact_len);
    s->ep_buf = buffer;

I have checked existing issues, dicussion and documentation

  • I confirm I have checked existing issues, dicussion and documentation.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions