io_uring/net: abstract out io_send_import() helper
authorJens Axboe <axboe@kernel.dk>
Tue, 15 Oct 2024 16:51:59 +0000 (10:51 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 28 Oct 2024 19:23:45 +0000 (13:23 -0600)
commitd1aecb721759caa884fcb0cad90129b405623fef
treed2deb8a0a4f0685d69460bcdf05ebc3660c91b3c
parent5f91d895015b13f23733301a11eb3bfcf8502b18
io_uring/net: abstract out io_send_import() helper

If provided buffers are used, this helper can be used to import the
necessary data from a provided buffer group. Only one user so far, but
add it in preparation of adding another one. While doing so, also split
the actual import into an iov_iter out into a separate helper.

In preparation for needing to know the number of mapped segments, return
that instead. It still returns < 0 on error.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c