io_uring/net: don't skip notifs for failed requests
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 27 Sep 2022 23:51:49 +0000 (00:51 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 28 Sep 2022 13:53:15 +0000 (07:53 -0600)
commit6ae91ac9a6aa7d6005c3c6d0f4d263fbab9f377f
tree301e384020026c1d18d0a2b0f930200c2d8f6c47
parentc278d9f8ac0db5590909e6d9e85b5ca2b786704f
io_uring/net: don't skip notifs for failed requests

We currently only add a notification CQE when the send succeded, i.e.
cqe.res >= 0. However, it'd be more robust to do buffer notifications
for failed requests as well in case drivers decide do something fanky.

Always return a buffer notification after initial prep, don't hide it.
This behaviour is better aligned with documentation and the patch also
helps the userspace to respect it.

Cc: stable@vger.kernel.org # 6.0
Suggested-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/9c8bead87b2b980fcec441b8faef52188b4a6588.1664292100.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c