public inbox for [email protected]
 help / color / mirror / Atom feed
From: "Carter Li 李通洲" <[email protected]>
To: Jiufei Xue <[email protected]>
Cc: io-uring <[email protected]>
Subject: Re: [PATCH liburing v3 0/2] add support for new timeout feature
Date: Wed, 5 Aug 2020 06:18:52 +0000	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

Sorry. I was thinking the pointer of io_uring will be passed with
io_uring_setup. My fault.

> 2020年8月5日 下午1:17,Jiufei Xue <[email protected]> 写道:
> 
> 
> 
> On 2020/8/5 上午11:28, Carter Li 李通洲 wrote:
>>> diff --git a/src/include/liburing.h b/src/include/liburing.h
>>> index 0505a4f..82c2980 100644
>>> --- a/src/include/liburing.h
>>> +++ b/src/include/liburing.h
>>> @@ -56,6 +56,9 @@ struct io_uring {
>>> 	struct io_uring_sq sq;
>>> 	struct io_uring_cq cq;
>>> 	unsigned flags;
>>> +	unsigned flags_internal;
>>> +	unsigned features;
>>> +	unsigned pad[4];
>>> 	int ring_fd;
>>> };
>> 
>> Won't it break existing code runs on newer kernel?
> 
> io_uring is a structure that used in userspace. It breaks the API
> with existing compiled application. So I have changed the soname
> to 2.0.7.
> 
> And for syscall io_uring_enter(), I have added a new feature bit
> IORING_FEAT_GETEVENTS_TIMEOUT and io_uring_enter() flag
> IORING_ENTER_GETEVENTS_TIMEOUT. Here are 3 cases below:
> 
> 1) old liburing <-> new kernel: old liburing can not pass the flag
>   IORING_ENTER_GETEVENTS_TIMEOUT, so new kernel will parse the arguments
>   the original way.
> 
> 2) new liburing <-> old kernel: feature IORING_FEAT_GETEVENTS_TIMEOUT
>   not supported, liburing will do things like before.
> 
> 3) new liburing <-> new kernel: feature IORING_FEAT_GETEVENTS_TIMEOUT
>   supported, liburing pass the new arguments with the flag
>   IORING_ENTER_GETEVENTS_TIMEOUT which helps kernel parse the arguments
>   correctly.
> 
> Thanks,
> Jiufei.
> 
>> Won't it break code compiled with new liburing but runs on older kernel?
>> 
> 
>> IMO In this case, a new syscall `io_uring_setup2` is required at least.
>> 
>> Regards,
>> Carter


  reply	other threads:[~2020-08-05  6:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05  3:28 [PATCH liburing v3 0/2] add support for new timeout feature Carter Li 李通洲
2020-08-05  5:17 ` Jiufei Xue
2020-08-05  6:18   ` Carter Li 李通洲 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-08-05  3:04 Jiufei Xue

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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