2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-13 07:07:23 -06:00
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
2022-07-12 21:52:46 +01:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-07 14:06:15 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-04 20:29:48 -06:00
|
|
|
|
2023-03-20 11:13:49 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-06-14 12:30:46 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-14 12:30:47 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
2022-09-08 13:20:33 +01:00
|
|
|
|
2022-07-25 10:52:06 +01:00
|
|
|
|
2024-01-29 12:00:58 -07:00
|
|
|
|
2022-09-08 13:20:33 +01:00
|
|
|
|
2022-09-21 12:17:51 +01:00
|
|
|
|
2022-09-08 13:20:33 +01:00
|
|
|
|
2023-01-22 10:02:55 -07:00
|
|
|
|
2022-07-12 21:52:45 +01:00
|
|
|
|
2023-06-12 13:51:36 -06:00
|
|
|
|
2022-09-21 12:17:51 +01:00
|
|
|
|
2022-09-01 11:54:04 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
2024-01-29 12:00:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-27 05:52:25 -08:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-27 05:52:25 -08:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
2024-03-20 15:19:44 -06:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 10:07:37 -06:00
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
|
|
|
|
|
2022-09-26 14:35:09 +01:00
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
2024-03-20 15:19:44 -06:00
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 10:07:37 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
|
|
|
|
|
2022-09-26 14:35:09 +01:00
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
2022-09-26 14:35:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-25 12:52:39 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-02-26 16:43:01 -07:00
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
2024-02-26 16:43:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
2024-02-26 16:43:01 -07:00
|
|
|
|
|
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
2024-02-26 16:43:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
2024-02-26 16:43:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
2024-02-26 16:43:01 -07:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
2023-06-12 13:51:36 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-19 14:16:47 -07:00
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
2023-06-12 13:51:36 -06:00
|
|
|
|
2023-06-20 16:11:51 -06:00
|
|
|
|
2023-06-12 13:51:36 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/net: add provided buffer support for IORING_OP_SEND
It's pretty trivial to wire up provided buffer support for the send
side, just like how it's done the receive side. This enables setting up
a buffer ring that an application can use to push pending sends to,
and then have a send pick a buffer from that ring.
One of the challenges with async IO and networking sends is that you
can get into reordering conditions if you have more than one inflight
at the same time. Consider the following scenario where everything is
fine:
1) App queues sendA for socket1
2) App queues sendB for socket1
3) App does io_uring_submit()
4) sendA is issued, completes successfully, posts CQE
5) sendB is issued, completes successfully, posts CQE
All is fine. Requests are always issued in-order, and both complete
inline as most sends do.
However, if we're flooding socket1 with sends, the following could
also result from the same sequence:
1) App queues sendA for socket1
2) App queues sendB for socket1
3) App does io_uring_submit()
4) sendA is issued, socket1 is full, poll is armed for retry
5) Space frees up in socket1, this triggers sendA retry via task_work
6) sendB is issued, completes successfully, posts CQE
7) sendA is retried, completes successfully, posts CQE
Now we've sent sendB before sendA, which can make things unhappy. If
both sendA and sendB had been using provided buffers, then it would look
as follows instead:
1) App queues dataA for sendA, queues sendA for socket1
2) App queues dataB for sendB queues sendB for socket1
3) App does io_uring_submit()
4) sendA is issued, socket1 is full, poll is armed for retry
5) Space frees up in socket1, this triggers sendA retry via task_work
6) sendB is issued, picks first buffer (dataA), completes successfully,
posts CQE (which says "I sent dataA")
7) sendA is retried, picks first buffer (dataB), completes successfully,
posts CQE (which says "I sent dataB")
Now we've sent the data in order, and everybody is happy.
It's worth noting that this also opens the door for supporting multishot
sends, as provided buffers would be a prerequisite for that. Those can
trigger either when new buffers are added to the outgoing ring, or (if
stalled due to lack of space) when space frees up in the socket.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-02-19 10:46:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 10:07:37 -06:00
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-03-07 12:43:22 -07:00
|
|
|
|
|
|
|
|
|
2022-09-21 12:17:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-09-21 12:17:51 +01:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-03-06 07:57:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-27 08:26:07 -06:00
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-27 08:26:07 -06:00
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-12 12:39:54 -06:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2023-06-19 09:35:34 -06:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-03-07 12:53:24 -07:00
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-09-08 13:20:29 +01:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-03-18 13:52:42 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-20 07:22:53 -06:00
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-07 15:09:33 -06:00
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-07 15:09:33 -06:00
|
|
|
|
|
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-07 15:08:17 -06:00
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
2024-08-08 10:42:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 09:34:21 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2023-05-22 13:11:10 +01:00
|
|
|
|
2024-03-05 09:34:21 -07:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-09-21 12:17:51 +01:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-07 12:53:24 -07:00
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-09-08 13:20:29 +01:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 13:52:42 -06:00
|
|
|
|
2024-03-05 13:10:04 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
2024-03-01 19:43:48 +05:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
2024-03-01 18:29:39 +03:00
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
2024-03-01 18:29:39 +03:00
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2023-09-14 16:51:09 +01:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-02-27 11:09:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-03-18 07:36:03 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-03-15 16:36:23 -06:00
|
|
|
|
2024-03-18 07:36:03 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-03-18 10:07:37 -06:00
|
|
|
|
2024-03-18 07:36:03 -06:00
|
|
|
|
2022-09-08 13:20:30 +01:00
|
|
|
|
2024-03-18 07:36:03 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-02 16:32:51 -07:00
|
|
|
|
2024-03-18 07:36:03 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-03-07 12:43:22 -07:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2023-02-24 16:01:24 +01:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
2023-01-22 10:02:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-29 12:00:58 -07:00
|
|
|
|
2024-03-18 07:36:03 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2024-03-05 15:39:16 -07:00
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
2024-07-02 09:16:46 -06:00
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
2024-03-05 15:39:16 -07:00
|
|
|
|
2023-05-17 12:20:44 -06:00
|
|
|
|
|
|
|
|
|
2024-07-02 09:16:46 -06:00
|
|
|
|
2024-08-27 08:26:07 -06:00
|
|
|
|
2024-07-02 09:16:46 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-27 08:26:07 -06:00
|
|
|
|
2024-07-02 09:16:46 -06:00
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
2024-01-29 11:54:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-08 13:55:58 +00:00
|
|
|
|
2024-03-18 22:00:31 +00:00
|
|
|
|
2024-01-29 12:00:58 -07:00
|
|
|
|
|
|
|
|
|
2024-02-25 12:52:39 -07:00
|
|
|
|
2024-01-29 11:54:18 -07:00
|
|
|
|
2024-03-05 15:39:16 -07:00
|
|
|
|
2024-01-29 12:00:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2024-01-29 12:00:58 -07:00
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
|
|
|
|
|
2024-01-29 11:54:18 -07:00
|
|
|
|
|
|
|
|
|
2024-03-08 13:55:58 +00:00
|
|
|
|
|
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
|
|
|
|
|
2022-11-17 18:40:17 +00:00
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
2022-07-08 11:18:35 -07:00
|
|
|
|
|
|
|
|
|
2024-03-18 13:52:42 -06:00
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-05 04:54:50 -07:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-05 04:54:50 -07:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2024-03-18 07:36:03 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-02-25 12:59:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-07 03:53:31 +00:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-05 11:07:31 -08:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-27 12:05:01 -06:00
|
|
|
|
2023-06-19 09:41:05 -06:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
|
|
|
|
|
2023-06-19 09:41:05 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
|
|
|
|
|
2023-06-19 09:41:05 -06:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-03-07 12:53:24 -07:00
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-09-08 13:20:29 +01:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:23 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 15:39:16 -07:00
|
|
|
|
2022-07-14 04:02:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-07 15:06:45 -06:00
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2024-03-18 07:36:03 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
2024-09-26 07:08:10 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-25 12:59:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
2024-07-02 09:37:30 -06:00
|
|
|
|
|
|
|
|
|
2024-03-05 15:39:16 -07:00
|
|
|
|
2024-07-02 09:37:30 -06:00
|
|
|
|
2024-03-05 16:22:04 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-07-02 09:37:30 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-03-05 15:39:16 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-03-05 15:39:16 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-07 12:53:24 -07:00
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2022-09-08 13:20:29 +01:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-03-05 15:39:16 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-26 07:08:10 -06:00
|
|
|
|
2022-06-30 02:12:23 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-26 07:08:10 -06:00
|
|
|
|
2022-06-30 02:12:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-09-21 12:17:52 +01:00
|
|
|
|
2022-09-01 11:54:04 +01:00
|
|
|
|
2022-09-08 13:20:34 +01:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
2022-09-01 11:54:04 +01:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
2022-09-23 16:23:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-01 11:54:04 +01:00
|
|
|
|
|
|
|
|
|
2022-11-04 10:59:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-21 12:17:52 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
2022-09-08 13:20:34 +01:00
|
|
|
|
2022-07-12 21:52:46 +01:00
|
|
|
|
2022-09-01 11:54:04 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
2024-03-07 12:43:22 -07:00
|
|
|
|
2024-04-30 16:42:30 +01:00
|
|
|
|
2024-03-07 12:43:22 -07:00
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
2022-09-01 11:54:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
2022-09-01 11:54:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-04 10:59:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-08 00:54:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-04 10:59:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-16 23:22:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
2024-04-08 00:54:57 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:45 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
2024-06-27 13:59:44 +01:00
|
|
|
|
2022-09-08 13:20:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-27 13:59:44 +01:00
|
|
|
|
2022-09-08 13:20:32 +01:00
|
|
|
|
|
|
|
|
|
2024-06-27 13:59:44 +01:00
|
|
|
|
2022-07-12 21:52:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-08 13:20:32 +01:00
|
|
|
|
2022-07-12 21:52:50 +01:00
|
|
|
|
2022-09-08 13:20:32 +01:00
|
|
|
|
2024-06-27 13:59:44 +01:00
|
|
|
|
2022-07-12 21:52:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-26 17:15:47 +01:00
|
|
|
|
2022-07-12 21:52:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 09:34:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-21 12:17:52 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
2022-09-08 13:20:34 +01:00
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
2022-09-28 00:51:49 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-21 11:16:40 +01:00
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
2024-03-05 09:34:21 -07:00
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:46 +01:00
|
|
|
|
2022-08-24 13:07:40 +01:00
|
|
|
|
2022-07-12 21:52:46 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
2024-04-08 00:54:57 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 09:34:21 -07:00
|
|
|
|
2023-05-22 13:11:10 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
2024-03-05 09:34:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-08-24 13:07:43 +01:00
|
|
|
|
2024-03-05 09:34:21 -07:00
|
|
|
|
2022-08-04 15:15:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-07 12:53:24 -07:00
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-08-04 15:15:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-24 13:07:39 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
2022-08-04 15:15:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-01 11:54:04 +01:00
|
|
|
|
2022-09-29 22:23:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 13:52:42 -06:00
|
|
|
|
2022-09-29 22:23:19 +01:00
|
|
|
|
2022-09-28 00:51:49 +01:00
|
|
|
|
2022-07-12 21:52:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 08:09:47 -06:00
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
2022-09-28 00:51:49 +01:00
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-21 11:16:41 +01:00
|
|
|
|
|
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
2024-04-08 00:54:57 +01:00
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-12 12:39:54 -06:00
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-07 12:53:24 -07:00
|
|
|
|
io_uring/net: always setup an io_async_msghdr
Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.
For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.
A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-16 17:26:09 -06:00
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-29 22:23:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 13:52:42 -06:00
|
|
|
|
2022-09-29 22:23:19 +01:00
|
|
|
|
2022-09-28 00:51:49 +01:00
|
|
|
|
2022-09-21 12:17:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-21 12:17:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-07 12:43:22 -07:00
|
|
|
|
2022-09-28 00:51:49 +01:00
|
|
|
|
|
|
|
|
|
2022-09-21 12:17:53 +01:00
|
|
|
|
2022-09-28 00:51:49 +01:00
|
|
|
|
|
|
|
|
|
2022-09-21 12:17:49 +01:00
|
|
|
|
|
|
|
|
|
2024-05-08 08:17:50 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-07 14:06:15 -06:00
|
|
|
|
2024-05-08 08:17:50 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-07 14:06:15 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-07 14:06:15 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-05-07 14:06:15 -06:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-05-09 09:31:05 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-05-09 09:41:10 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
2024-05-08 08:17:50 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-09 09:41:10 -06:00
|
|
|
|
|
|
|
|
|
2024-05-09 09:31:05 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-07 14:06:15 -06:00
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-17 18:40:16 +00:00
|
|
|
|
2024-02-14 08:23:05 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-09 09:41:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
2024-05-09 09:41:10 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-21 07:43:42 -07:00
|
|
|
|
|
|
|
|
|
2024-05-09 09:41:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:28 -07:00
|
|
|
|
2024-05-09 09:41:10 -06:00
|
|
|
|
2024-02-14 08:23:05 -07:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2024-03-18 20:37:22 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-20 11:13:49 -06:00
|
|
|
|
2024-03-18 20:37:22 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2024-03-18 20:37:22 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 20:37:22 -06:00
|
|
|
|
|
|
|
|
|
2023-03-20 11:13:49 -06:00
|
|
|
|
|
|
|
|
|
2022-10-04 20:29:48 -06:00
|
|
|
|
|
|
|
|
|
io_uring/net: ensure socket is marked connected on connect retry
io_uring does non-blocking connection attempts, which can yield some
unexpected results if a connect request is re-attempted by an an
application. This is equivalent to the following sync syscall sequence:
sock = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, IPPROTO_TCP);
connect(sock, &addr, sizeof(addr);
ret == -1 and errno == EINPROGRESS expected here. Now poll for POLLOUT
on sock, and when that returns, we expect the socket to be connected.
But if we follow that procedure with:
connect(sock, &addr, sizeof(addr));
you'd expect ret == -1 and errno == EISCONN here, but you actually get
ret == 0. If we attempt the connection one more time, then we get EISCON
as expected.
io_uring used to do this, but turns out that bluetooth fails with EBADFD
if you attempt to re-connect. Also looks like EISCONN _could_ occur with
this sequence.
Retain the ->in_progress logic, but work-around a potential EISCONN or
EBADFD error and only in those cases look at the sock_error(). This
should work in general and avoid the odd sequence of a repeated connect
request returning success when the socket is already connected.
This is all a side effect of the socket state being in a CONNECTING
state when we get EINPROGRESS, and only a re-connect or other related
operation will turn that into CONNECTED.
Cc: stable@vger.kernel.org
Fixes: 3fb1bd688172 ("io_uring/net: handle -EINPROGRESS correct for IORING_OP_CONNECT")
Link: https://github.com/axboe/liburing/issues/980
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-11-03 10:35:40 -06:00
|
|
|
|
2023-03-20 11:13:49 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
io_uring/net: ensure socket is marked connected on connect retry
io_uring does non-blocking connection attempts, which can yield some
unexpected results if a connect request is re-attempted by an an
application. This is equivalent to the following sync syscall sequence:
sock = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, IPPROTO_TCP);
connect(sock, &addr, sizeof(addr);
ret == -1 and errno == EINPROGRESS expected here. Now poll for POLLOUT
on sock, and when that returns, we expect the socket to be connected.
But if we follow that procedure with:
connect(sock, &addr, sizeof(addr));
you'd expect ret == -1 and errno == EISCONN here, but you actually get
ret == 0. If we attempt the connection one more time, then we get EISCON
as expected.
io_uring used to do this, but turns out that bluetooth fails with EBADFD
if you attempt to re-connect. Also looks like EISCONN _could_ occur with
this sequence.
Retain the ->in_progress logic, but work-around a potential EISCONN or
EBADFD error and only in those cases look at the sock_error(). This
should work in general and avoid the odd sequence of a repeated connect
request returning success when the socket is already connected.
This is all a side effect of the socket state being in a CONNECTING
state when we get EINPROGRESS, and only a re-connect or other related
operation will turn that into CONNECTED.
Cc: stable@vger.kernel.org
Fixes: 3fb1bd688172 ("io_uring/net: handle -EINPROGRESS correct for IORING_OP_CONNECT")
Link: https://github.com/axboe/liburing/issues/980
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-11-03 10:35:40 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 20:37:22 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
2024-06-14 12:30:46 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-13 19:05:02 +09:00
|
|
|
|
2024-06-14 12:30:46 -04:00
|
|
|
|
|
|
|
|
|
2024-07-13 19:05:02 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-14 12:30:46 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-14 12:30:47 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-13 19:05:02 +09:00
|
|
|
|
2024-06-14 12:30:47 -04:00
|
|
|
|
|
|
|
|
|
2024-07-13 19:05:02 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-14 12:30:47 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-20 15:19:44 -06:00
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
2024-03-20 15:19:44 -06:00
|
|
|
|
2024-03-16 15:33:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 14:30:09 -06:00
|
|
|
|
2022-05-25 06:25:13 -06:00
|
|
|
|