From: Breno Leitao <leitao@debian.org>
To: io-uring@vger.kernel.org, axboe@kernel.dk, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: leit@fb.com, asml.silence@gmail.com, dsahern@kernel.org,
matthieu.baerts@tessares.net, martineau@kernel.org,
marcelo.leitner@gmail.com, lucien.xin@gmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
dccp@vger.kernel.org, mptcp@lists.linux.dev,
linux-sctp@vger.kernel.org, ast@kernel.org, kuniyu@amazon.com,
martin.lau@kernel.org
Subject: [RFC PATCH v2 0/4] add initial io_uring_cmd support for sockets
Date: Wed, 14 Jun 2023 04:07:53 -0700 [thread overview]
Message-ID: <20230614110757.3689731-1-leitao@debian.org> (raw)
This patchset creates the initial plumbing for a io_uring command for
sockets.
For now, create two uring commands for sockets, SOCKET_URING_OP_SIOCOUTQ
and SOCKET_URING_OP_SIOCINQ, which are available in TCP, UDP and RAW
sockets.
In order to test this code, I created a liburing test, which is
currently located at [1], and I will create a pull request once we are
good with this patchset.
V1 submission was sent a while ago[2], but it required more plumbing
that were done in different patch submissions[3][4].
PS: This patchset depends on a commit[4] that is not committed to the
tree yet (but close too, IMO).
[1] Link: https://github.com/leitao/liburing/blob/master/test/socket-io-cmd.c
[2] Link: https://lore.kernel.org/lkml/20230406144330.1932798-1-leitao@debian.org/
[3] Link: https://lore.kernel.org/lkml/0a50fae3-1cf4-475e-48ae-25f41967842f@kernel.dk/
[4] Link: https://lore.kernel.org/lkml/20230609152800.830401-1-leitao@debian.org/
V1->V2:
* Rely on a generic socket->ioctl infrastructure instead of
reimplementing it
Breno Leitao (4):
net: wire up support for file_operations->uring_cmd()
net: add uring_cmd callback to UDP
net: add uring_cmd callback to TCP
net: add uring_cmd callback to raw "protocol"
include/linux/net.h | 2 ++
include/net/raw.h | 3 +++
include/net/sock.h | 6 ++++++
include/net/tcp.h | 2 ++
include/net/udp.h | 2 ++
include/uapi/linux/net.h | 5 +++++
net/core/sock.c | 17 +++++++++++++++--
net/dccp/ipv4.c | 1 +
net/ipv4/af_inet.c | 3 +++
net/ipv4/raw.c | 23 +++++++++++++++++++++++
net/ipv4/tcp.c | 21 +++++++++++++++++++++
net/ipv4/tcp_ipv4.c | 1 +
net/ipv4/udp.c | 22 ++++++++++++++++++++++
net/l2tp/l2tp_ip.c | 1 +
net/mptcp/protocol.c | 1 +
net/sctp/protocol.c | 1 +
net/socket.c | 13 +++++++++++++
17 files changed, 122 insertions(+), 2 deletions(-)
--
2.34.1
next reply other threads:[~2023-06-14 11:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 11:07 Breno Leitao [this message]
2023-06-14 11:07 ` [RFC PATCH v2 1/4] net: wire up support for file_operations->uring_cmd() Breno Leitao
2023-06-14 15:15 ` David Ahern
2023-06-19 9:28 ` Pavel Begunkov
2023-06-19 14:06 ` Kanchan Joshi
2023-06-20 2:09 ` David Ahern
2023-06-19 11:20 ` Breno Leitao
2023-06-19 16:12 ` David Ahern
2023-06-23 10:17 ` Stefan Metzmacher
2023-06-23 15:20 ` David Ahern
2023-06-14 11:07 ` [RFC PATCH v2 2/4] net: add uring_cmd callback to UDP Breno Leitao
2023-06-14 11:07 ` [RFC PATCH v2 3/4] net: add uring_cmd callback to TCP Breno Leitao
2023-06-14 11:07 ` [RFC PATCH v2 4/4] net: add uring_cmd callback to raw "protocol" Breno Leitao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230614110757.3689731-1-leitao@debian.org \
--to=leitao@debian.org \
--cc=asml.silence@gmail.com \
--cc=ast@kernel.org \
--cc=axboe@kernel.dk \
--cc=davem@davemloft.net \
--cc=dccp@vger.kernel.org \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=io-uring@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=leit@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=marcelo.leitner@gmail.com \
--cc=martin.lau@kernel.org \
--cc=martineau@kernel.org \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).