Re: [PATCH 0/2] usb: gadget: User space URBs for FunctionFS

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

 



On Thu, Nov 12, 2020 at 06:05:35PM +0100, Ingo Rohloff wrote:
> On Wed, 11 Nov 2020 19:40:54 +0100
> Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> > On Wed, Nov 11, 2020 at 06:07:16PM +0100, Ingo Rohloff wrote:
> > ...
> > > I now implement two new ioctls for FunctionFS:
> > >   FUNCTIONFS_SUBMITBULKURB
> > >   FUNCTIONFS_REAPBULKURB
> > > which provide simliar functionality.
> > > 
> > > A similar functionality is already implemented via AIO. But: To use
> > > this API, your user space environment needs to know how to use
> > > these system calls.  
> 
> OK I now understand why I was confused myself:
> I was looking into the POSIX AIO functions ("man 7 aio").
> At least in the C library which I use, the implementation of
> POSIX AIO does not use the native Linux system calls.
> What I meant above was: This C library does not know about the native
> Linux system calls.

Then use a new library :)

> Now because of your comment I learned about "libaio", which uses the
> Linux native system calls.

Great!

> The first problem here: Where do you get this library from ?
> At the end I got it from here:
>   https://pagure.io/libaio 
>   version 0.3.111
> I am still not sure if this is the right place, because at least
> Debian provides a 0.3.112 version, which seems to use an extra
> system call (io_pgetevents); no clue if I should use the Debian
> version or not.

I do not know if this is the latest one or not, sorry.  Ask your Linux
distro about this, or use the "raw" kernel aio syscalls.

The gadget code has always used AIO since the very beginning, this is
nothing new (decades old).  While it might feel "odd", I recommend
working with it first before trying to create new kernel apis that
duplicate existing functionality for the only reason being that AIO is
"different".

But if you find bugs in the current implementation, we will gladly
accept patches.

thanks,

greg k-h



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

  Powered by Linux