[PATCH 0/1] Zerocopy for USB Gadget FunctionFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The
commit f7d34b445abc00e979b7 ("USB: Add support for usbfs zerocopy.")
added support for zerocopy operations for an USB Host via devio.c

The idea is to mmap buffers into user space, which are then filled
with data (either by the kernel for reads or by the user for writes).

Using these mmapped buffers avoids copying data between 
kernel space and user space.

The proposed patch here, does the same for a USB Gadget and an 
application using USB FunctionFS.

The proposed patch keeps one big list of mmaped buffers for the
whole f_fs.c module, rather then binding them to a particular
file descriptor.
The rational behind this is, that you then might even pass around
buffers between different endpoints and even different functions.

If you want to test this patch, I have some demonstration code here:

   https://github.com/trace32/test_usb_ffs

so long
  Ingo

Ingo Rohloff (1):
  usb: gadget: f_fs: Support zerocopy transfers via mmap.

 drivers/usb/gadget/function/f_fs.c | 230 ++++++++++++++++++++++++++++-
 1 file changed, 226 insertions(+), 4 deletions(-)

-- 
2.17.1




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux