io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glauber@scylladb.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: io-uring@vger.kernel.org
Subject: Re: [PATCH liburing] add another helper for probing existing opcodes
Date: Fri, 31 Jan 2020 10:28:01 -0500	[thread overview]
Message-ID: <CAD-J=zYGOCSa34u6MCLOs+j9_Kc+C4AhMwdDh+WeK+qmE53ntQ@mail.gmail.com> (raw)
In-Reply-To: <d4cff1bf-bb75-e202-26c8-a6d82fae5737@kernel.dk>

On Fri, Jan 31, 2020 at 10:24 AM Jens Axboe <axboe@kernel.dk> wrote:
>
> On 1/31/20 8:00 AM, Glauber Costa wrote:
> > There are situations where one does not have a ring initialized yet, and
> > yet they may want to know which opcodes are supported before doing so.
> >
> > We have recently introduced io_uring_get_probe(io_uring*) to do a
> > similar task when the ring already exists. Because this was committed
> > recently and this hasn't seen a release, I thought I would just go ahead
> > and change that to io_uring_get_probe_ring(io_uring*), because I suck at
> > finding another meaningful name for this case (io_uring_get_probe_noring
> > sounded way too ugly to me)
> >
> > A minimal ring is initialized and torn down inside the function.
> >
> > Signed-off-by: Glauber Costa <glauber@scylladb.com>
> > ---
> >  src/include/liburing.h |  4 +++-
> >  src/liburing.map       |  1 +
> >  src/setup.c            | 15 ++++++++++++++-
> >  test/probe.c           |  2 +-
> >  4 files changed, 19 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/include/liburing.h b/src/include/liburing.h
> > index 39db902..aa11282 100644
> > --- a/src/include/liburing.h
> > +++ b/src/include/liburing.h
> > @@ -77,7 +77,9 @@ struct io_uring {
> >   * return an allocated io_uring_probe structure, or NULL if probe fails (for
> >   * example, if it is not available). The caller is responsible for freeing it
> >   */
> > -extern struct io_uring_probe *io_uring_get_probe(struct io_uring *ring);
> > +extern struct io_uring_probe *io_uring_get_probe_ring(struct io_uring *ring);
> > +/* same as io_uring_get_probe_ring, but takes care of ring init and teardown */
> > +extern struct io_uring_probe *io_uring_get_probe();
>
> Include 'void' for no parameter.
>
> > @@ -186,3 +186,16 @@ fail:
> >       free(probe);
> >       return NULL;
> >  }
> > +
> > +struct io_uring_probe *io_uring_get_probe() {
>
> void here as well, and new line before the opening bracket.
>
> Minor stuff, rest looks fine to me.

What's next? tabs instead of spaces?
You monsters.

      reply	other threads:[~2020-01-31 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31 15:00 [PATCH liburing] add another helper for probing existing opcodes Glauber Costa
2020-01-31 15:24 ` Jens Axboe
2020-01-31 15:28   ` Glauber Costa [this message]

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='CAD-J=zYGOCSa34u6MCLOs+j9_Kc+C4AhMwdDh+WeK+qmE53ntQ@mail.gmail.com' \
    --to=glauber@scylladb.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@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).