Re: [RFC v2 02/19] skbuff: pass a struct ubuf_info in msghdr

From: Hao Xu
Date: Tue Jan 11 2022 - 08:52:02 EST


在 2021/12/21 下午11:35, Pavel Begunkov 写道:
Instead of the net stack managing ubuf_info, allow to pass it in from
outside in a struct msghdr (in-kernel structure), so io_uring can make
use of it.

Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
---
Hi Pavel,
I've some confusions here since I have a lack of
network knowledge.
The first one is why do we make ubuf_info visible
for io_uring. Why not just follow the old MSG_ZEROCOPY
logic?

The second one, my understanding about the buffer
lifecycle is that the kernel side informs
the userspace by a cqe generated by the ubuf_info
callback that all the buffers attaching to the
same notifier is now free to use when all the data
is sent, then why is the flush in 13/19 needed as
it is at the submission period?

Regards,
Hao