2023-04-15 17:00:08

by Ammar Faizi

[permalink] [raw]
Subject: [PATCH liburing 0/3] io_uring-udp fix, manpage fix, and hppa cross-compiler

Hi Jens,

There are three patches in this series:

1. Fix the wrong IPv6 address in io_uring-udp (me).

Before:

port bound to 49567
received 4 bytes 28 from ::2400:6180:0:d1:0:0:47048
received 4 bytes 28 from ::2400:6180:0:d1:0:0:54755
received 4 bytes 28 from ::2400:6180:0:d1:0:0:57968

(the IPv6 address is wrong)

After:

port bound to 48033
received 4 bytes 28 from [2400:6180:0:d1::6a4:a00f]:40456
received 4 bytes 28 from [2400:6180:0:d1::6a4:a00f]:50306
received 4 bytes 28 from [2400:6180:0:d1::6a4:a00f]:52291

2. io_uring_cqe_get_data() manpage fix (me).

The return value of io_uring_cqe_get_data() will be undefined if the
user_data is not set from the SQE side.

3. Add hppa cross-compiler to the CI (Alviro).

Signed-off-by: Alviro Iskandar Setiawan <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---

Alviro Iskandar Setiawan (1):
github: Add hppa cross compiler

Ammar Faizi (2):
io_uring-udp: Fix the wrong IPv6 binary to string conversion
man/io_uring_cqe_get_data.3: Fix a misleading return value

.github/workflows/build.yml | 7 +++++++
examples/io_uring-udp.c | 14 +++++++++++---
man/io_uring_cqe_get_data.3 | 2 +-
3 files changed, 19 insertions(+), 4 deletions(-)


base-commit: 4fed79510a189cc7997f6d04855ebf7fb66cc323
--
Ammar Faizi


2023-04-15 17:01:07

by Ammar Faizi

[permalink] [raw]
Subject: [PATCH liburing 2/3] github: Add hppa cross compiler

From: Alviro Iskandar Setiawan <[email protected]>

Since commit 9c6689848ebf ("Default to mmap'ed provided buffers for
hppa"), the core library has hppa specific code. Add hppa cross compiler
on the GitHub bot CI to catch build breakage for this arch.

Cc: Linux Parisc Mailing List <[email protected]>
Signed-off-by: Alviro Iskandar Setiawan <[email protected]>
Co-authored-by: Ammar Faizi <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
.github/workflows/build.yml | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index fed5b38c3a507336..8dd22dfd125692de 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -85,6 +85,13 @@ jobs:
cc: mips-linux-gnu-gcc
cxx: mips-linux-gnu-g++

+ # hppa
+ - arch: hppa
+ cc_pkg: gcc-hppa-linux-gnu
+ cxx_pkg: g++-hppa-linux-gnu
+ cc: hppa-linux-gnu-gcc
+ cxx: hppa-linux-gnu-g++
+
env:
FLAGS: -g -O3 -Wall -Wextra -Werror -Wno-sign-compare ${{matrix.extra_flags}}

--
Ammar Faizi

2023-04-15 17:01:24

by Ammar Faizi

[permalink] [raw]
Subject: [PATCH liburing 3/3] man/io_uring_cqe_get_data.3: Fix a misleading return value

Since commit 8ecd3fd959634df8 ("Don't clear sqe->user_data as part of
command prep"), the prep functions no longer zero the user data. If the
user_data is not set, it will contain whatever previous value in it.

Therefore, the returned value when the user_data is-not-set is not
always NULL. And oh, someone once hit an issue because they assume the
return value is NULL if the user_data is not set. See the link below.

Fix the manpage, tell that the return value will be undefined.

Link: https://github.com/axboe/liburing/issues/575#issuecomment-1110516140
Signed-off-by: Ammar Faizi <[email protected]>
---
man/io_uring_cqe_get_data.3 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/io_uring_cqe_get_data.3 b/man/io_uring_cqe_get_data.3
index 4cbb32cd864e12c2..a4d2988a49d92aa8 100644
--- a/man/io_uring_cqe_get_data.3
+++ b/man/io_uring_cqe_get_data.3
@@ -46,7 +46,7 @@ or
If the
.I user_data
value has been set before submitting the request, it will be returned.
-Otherwise the functions returns NULL.
+Otherwise, the return value is undefined.
.SH SEE ALSO
.BR io_uring_get_sqe (3),
.BR io_uring_sqe_set_data (3),
--
Ammar Faizi

2023-04-15 20:38:39

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH liburing 0/3] io_uring-udp fix, manpage fix, and hppa cross-compiler

On 4/15/23 10:59 AM, Ammar Faizi wrote:
> Hi Jens,
>
> There are three patches in this series:
>
> 1. Fix the wrong IPv6 address in io_uring-udp (me).
>
> Before:
>
> port bound to 49567
> received 4 bytes 28 from ::2400:6180:0:d1:0:0:47048
> received 4 bytes 28 from ::2400:6180:0:d1:0:0:54755
> received 4 bytes 28 from ::2400:6180:0:d1:0:0:57968
>
> (the IPv6 address is wrong)
>
> After:
>
> port bound to 48033
> received 4 bytes 28 from [2400:6180:0:d1::6a4:a00f]:40456
> received 4 bytes 28 from [2400:6180:0:d1::6a4:a00f]:50306
> received 4 bytes 28 from [2400:6180:0:d1::6a4:a00f]:52291
>
> 2. io_uring_cqe_get_data() manpage fix (me).
>
> The return value of io_uring_cqe_get_data() will be undefined if the
> user_data is not set from the SQE side.
>
> 3. Add hppa cross-compiler to the CI (Alviro).

Applied, thanks.

--
Jens Axboe