diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2024-04-09 14:05:53 -0700 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2024-04-15 08:10:26 -0600 |
| commit | 8c9a6f549e65912825e31dc1e0e3f7995984649d (patch) | |
| tree | 776d37d72d833f664534e2eb79830854c357a7d6 /include/linux/io_uring/net.h | |
| parent | d285da7dbd3b3cc9b4cf822039a87ca4e4106ecf (diff) | |
io_uring: separate header for exported net bits
We're exporting some io_uring bits to networking, e.g. for implementing
a net callback for io_uring cmds, but we don't want to expose more than
needed. Add a separate header for networking.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: David Wei <dw@davidwei.uk>
Link: https://lore.kernel.org/r/20240409210554.1878789-1-dw@davidwei.uk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/io_uring/net.h')
| -rw-r--r-- | include/linux/io_uring/net.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/io_uring/net.h b/include/linux/io_uring/net.h new file mode 100644 index 000000000000..b58f39fed4d5 --- /dev/null +++ b/include/linux/io_uring/net.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef _LINUX_IO_URING_NET_H +#define _LINUX_IO_URING_NET_H + +struct io_uring_cmd; + +#if defined(CONFIG_IO_URING) +int io_uring_cmd_sock(struct io_uring_cmd *cmd, unsigned int issue_flags); + +#else +static inline int io_uring_cmd_sock(struct io_uring_cmd *cmd, + unsigned int issue_flags) +{ + return -EOPNOTSUPP; +} +#endif + +#endif |
