From: Greg KH <gregkh@linuxfoundation.org>
To: Ingo Rohloff <ingo.rohloff@lauterbach.com>
Cc: balbi@kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 0/2] usb: gadget: User space URBs for FunctionFS
Date: Fri, 13 Nov 2020 15:20:18 +0100 [thread overview]
Message-ID: <X66WIqMoGWLUyraz@kroah.com> (raw)
In-Reply-To: <20201112180528.33bbe44c@ingxiaomi.fritz.box>
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@linuxfoundation.org> 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
next prev parent reply other threads:[~2020-11-13 14:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 17:07 [PATCH 0/2] usb: gadget: User space URBs for FunctionFS Ingo Rohloff
2020-11-11 17:07 ` [PATCH 1/2] usb: gadget: ffs: Implement user URBs for USB bulk endpoints Ingo Rohloff
2020-11-15 10:59 ` kernel test robot
2020-11-15 10:59 ` [RFC PATCH] usb: gadget: ffs: async_bulkurb_active_lock can be static kernel test robot
2020-11-11 17:07 ` [PATCH 2/2] usb: gadget: ffs: tools: test applications for user URBs Ingo Rohloff
2020-11-11 18:40 ` [PATCH 0/2] usb: gadget: User space URBs for FunctionFS Greg KH
2020-11-12 17:05 ` Ingo Rohloff
2020-11-13 14:20 ` Greg KH [this message]
2020-11-13 15:20 ` Ingo Rohloff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=X66WIqMoGWLUyraz@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=balbi@kernel.org \
--cc=ingo.rohloff@lauterbach.com \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).