io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	io-uring Mailing List <io-uring@vger.kernel.org>
Subject: Re: [PATCH liburing 3/4] tests: add tests for zerocopy send and notifications
Date: Mon, 25 Jul 2022 12:28:31 +0100	[thread overview]
Message-ID: <c89d373f-bc0d-dccf-630f-763e8e1a0fe5@gmail.com> (raw)
In-Reply-To: <bf034949-b5b3-f155-ca33-781712273881@gnuweeb.org>

On 7/25/22 11:35, Ammar Faizi wrote:
> On 7/25/22 5:03 PM, Pavel Begunkov wrote:> diff --git a/test/Makefile b/test/Makefile
>> index 8945368..7b6018c 100644
>> --- a/test/Makefile
>> +++ b/test/Makefile
>> @@ -175,6 +175,7 @@ test_srcs := \
>>       xattr.c \
>>       skip-cqe.c \
>>       single-issuer.c \
>> +    send-zcopy.c \
>>       # EOL
> 
> I have been trying to keep this list sorted alphabetically. Can we?

Don't see any reason for that, especially since it's not sorted.


>> +int main(int argc, char *argv[])
>> +{
>> +    struct io_uring ring;
>> +    int i, ret, sp[2];
>> +
>> +    if (argc > 1)
>> +        return 0;
> 
> New test should use the provided exit code protocol. This should have
> been "return T_EXIT_SKIP;"

Oh, I already hate those rules, sounds like they were specifically
honed to make patching harder. By the way, while we're at it,
what is T_EXIT_ERROR? Why it's not used anywhere and how it's
different from T_EXIT_FAIL?


>> +    ret = io_uring_queue_init(32, &ring, 0);
>> +    if (ret) {
>> +        fprintf(stderr, "queue init failed: %d\n", ret);
>> +        return 1;
>> +    }
> 
> This should have been "return T_EXIT_FAIL;".
> 
>> +    ret = register_notifications(&ring);
>> +    if (ret == -EINVAL) {
>> +        printf("sendzc is not supported, skip\n");
>> +        return 0;
>> +    } else if (ret) {
>> +        fprintf(stderr, "register notif failed %i\n", ret);
>> +        return 1;
>> +    }
> [...]
>> +
>> +out:
>> +    io_uring_queue_exit(&ring);
>> +    close(sp[0]);
>> +    close(sp[1]);
>> +    return 0;
>> +}
> 
> and so on...
> 

-- 
Pavel Begunkov

  reply	other threads:[~2022-07-25 11:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 10:03 [PATCH liburing 0/4] zerocopy send headers and tests Pavel Begunkov
2022-07-25 10:03 ` [PATCH liburing 1/4] io_uring.h: sync with kernel for zc send and notifiers Pavel Begunkov
2022-07-25 10:03 ` [PATCH liburing 2/4] liburing: add zc send and notif helpers Pavel Begunkov
2022-07-25 10:20   ` Ammar Faizi
2022-07-25 11:18     ` Pavel Begunkov
2022-07-25 10:03 ` [PATCH liburing 3/4] tests: add tests for zerocopy send and notifications Pavel Begunkov
2022-07-25 10:35   ` Ammar Faizi
2022-07-25 11:28     ` Pavel Begunkov [this message]
2022-07-25 12:08       ` Ammar Faizi
2022-07-25 14:07         ` Pavel Begunkov
2022-07-25 18:55         ` Eli Schwartz
2022-07-25 23:37           ` Jens Axboe
2022-07-26  9:35             ` Ammar Faizi
2022-07-25 10:03 ` [PATCH liburing 4/4] examples: add a zerocopy send example Pavel Begunkov

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=c89d373f-bc0d-dccf-630f-763e8e1a0fe5@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=ammarfaizi2@gnuweeb.org \
    --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).