mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
io_uring-7.0-20260305
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmmqPTAQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpueIEACHF0uws+uZSEsy9LUyC9ha8+5YN9szIJ3K QUGxa9pmCnQG5K50KpxyEYP6buaJDy1smJGgD2obkeGncC4w6xKK2kQTQV1U+C1C YA+7B/3HLhz5AWS6GIbRy6VZ599I4evlF8W79dX8BTnF8Y1ddkSuUnKx//q0AoQZ hr3foglcFlchy8JuQ2/MpxzfOouvNMdMmeUN4O+t8iXDrmePFYIOgrLcT+ObgC5D SXWx2cc3hMJ35hcSzedMWEBFcXnkX9nfh8Hd/+uPRcKsIwS8kCo6z01GoT/BCPRA jdrxAfoYSL16HPfq6GU52n6iCaRd+5NK+tt/ECCzTxGL32Hadrr+nxw4O7g3Q96u 07zeaqHSoTGUchtlqrGjALQLP2yxdACEjxMh3rfdStRv3x3bbbVVDdioVEzPukCr EBA+AbqaaG3LIYXwcY+15zx5NrAfeBAP1RjLgoV0s2ch4ghEqvnZGY4NLBDkcQ2R 97tM9+OdecBrsnlQr5GBoDbwpqc2pDEqSjkYDwoXqvqXs0DrMRq2MQw1Hjjh7Z7G FZx1KNTiLB/YQ0sSyMcUKnH+qBA0FxwN/C6dDnRjj4dH5YsoeG/GhsS3B00a+0yE S3MKrsf+uN21OYLVPSTEN6qS+02ZvK6E/Aw7/fk2IV60JMeM5KvCccmxa53dKls8 iyEJ7nVLOg== =xyKA -----END PGP SIGNATURE----- Merge tag 'io_uring-7.0-20260305' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux Pull io_uring fixes from Jens Axboe: - Fix a typo in the mock_file help text - Fix a comment regarding IORING_SETUP_TASKRUN_FLAG in the io_uring.h UAPI header - Use READ_ONCE() for reading refill queue entries - Reject SEND_VECTORIZED for fixed buffer sends, as it isn't implemented. Currently this flag is silently ignored This is in preparation for making these work, but first we need a fixup so that older kernels will correctly reject them - Ensure "0" means default for the rx page size * tag 'io_uring-7.0-20260305' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: io_uring/zcrx: use READ_ONCE with user shared RQEs io_uring/mock: Fix typo in help text io_uring/net: reject SEND_VECTORIZED when unsupported io_uring: correct comment for IORING_SETUP_TASKRUN_FLAG io_uring/zcrx: don't set rx_page_size when not requested
This commit is contained in:
commit
3ad66a34cc
4 changed files with 10 additions and 5 deletions
|
|
@ -188,7 +188,8 @@ enum io_uring_sqe_flags_bit {
|
||||||
/*
|
/*
|
||||||
* If COOP_TASKRUN is set, get notified if task work is available for
|
* If COOP_TASKRUN is set, get notified if task work is available for
|
||||||
* running and a kernel transition would be needed to run it. This sets
|
* running and a kernel transition would be needed to run it. This sets
|
||||||
* IORING_SQ_TASKRUN in the sq ring flags. Not valid with COOP_TASKRUN.
|
* IORING_SQ_TASKRUN in the sq ring flags. Not valid without COOP_TASKRUN
|
||||||
|
* or DEFER_TASKRUN.
|
||||||
*/
|
*/
|
||||||
#define IORING_SETUP_TASKRUN_FLAG (1U << 9)
|
#define IORING_SETUP_TASKRUN_FLAG (1U << 9)
|
||||||
#define IORING_SETUP_SQE128 (1U << 10) /* SQEs are 128 byte */
|
#define IORING_SETUP_SQE128 (1U << 10) /* SQEs are 128 byte */
|
||||||
|
|
|
||||||
|
|
@ -1902,7 +1902,7 @@ config IO_URING_MOCK_FILE
|
||||||
default n
|
default n
|
||||||
depends on IO_URING
|
depends on IO_URING
|
||||||
help
|
help
|
||||||
Enable mock files for io_uring subststem testing. The ABI might
|
Enable mock files for io_uring subsystem testing. The ABI might
|
||||||
still change, so it's still experimental and should only be enabled
|
still change, so it's still experimental and should only be enabled
|
||||||
for specific test purposes.
|
for specific test purposes.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -375,6 +375,8 @@ static int io_send_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)
|
||||||
kmsg->msg.msg_namelen = addr_len;
|
kmsg->msg.msg_namelen = addr_len;
|
||||||
}
|
}
|
||||||
if (sr->flags & IORING_RECVSEND_FIXED_BUF) {
|
if (sr->flags & IORING_RECVSEND_FIXED_BUF) {
|
||||||
|
if (sr->flags & IORING_SEND_VECTORIZED)
|
||||||
|
return -EINVAL;
|
||||||
req->flags |= REQ_F_IMPORT_BUFFER;
|
req->flags |= REQ_F_IMPORT_BUFFER;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -837,7 +837,8 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
|
||||||
if (ret)
|
if (ret)
|
||||||
goto netdev_put_unlock;
|
goto netdev_put_unlock;
|
||||||
|
|
||||||
mp_param.rx_page_size = 1U << ifq->niov_shift;
|
if (reg.rx_buf_len)
|
||||||
|
mp_param.rx_page_size = 1U << ifq->niov_shift;
|
||||||
mp_param.mp_ops = &io_uring_pp_zc_ops;
|
mp_param.mp_ops = &io_uring_pp_zc_ops;
|
||||||
mp_param.mp_priv = ifq;
|
mp_param.mp_priv = ifq;
|
||||||
ret = __net_mp_open_rxq(ifq->netdev, reg.if_rxq, &mp_param, NULL);
|
ret = __net_mp_open_rxq(ifq->netdev, reg.if_rxq, &mp_param, NULL);
|
||||||
|
|
@ -926,11 +927,12 @@ static inline bool io_parse_rqe(struct io_uring_zcrx_rqe *rqe,
|
||||||
struct io_zcrx_ifq *ifq,
|
struct io_zcrx_ifq *ifq,
|
||||||
struct net_iov **ret_niov)
|
struct net_iov **ret_niov)
|
||||||
{
|
{
|
||||||
|
__u64 off = READ_ONCE(rqe->off);
|
||||||
unsigned niov_idx, area_idx;
|
unsigned niov_idx, area_idx;
|
||||||
struct io_zcrx_area *area;
|
struct io_zcrx_area *area;
|
||||||
|
|
||||||
area_idx = rqe->off >> IORING_ZCRX_AREA_SHIFT;
|
area_idx = off >> IORING_ZCRX_AREA_SHIFT;
|
||||||
niov_idx = (rqe->off & ~IORING_ZCRX_AREA_MASK) >> ifq->niov_shift;
|
niov_idx = (off & ~IORING_ZCRX_AREA_MASK) >> ifq->niov_shift;
|
||||||
|
|
||||||
if (unlikely(rqe->__pad || area_idx))
|
if (unlikely(rqe->__pad || area_idx))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue