netdev: expose io_uring rx_page_order order via netlink

This adds observability for the io_uring zcrx rx-buf-len configuration.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Yael Chemla <ychemla@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Acked-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/20260612211709.1456966-3-dtatulea@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Dragos Tatulea 2026-06-13 00:17:03 +03:00 committed by Jakub Kicinski
parent 0399e68592
commit 5c4adb7fb4
4 changed files with 20 additions and 1 deletions

View File

@ -127,7 +127,14 @@ attribute-sets:
enum: xsk-flags
-
name: io-uring-provider-info
attributes: []
attributes:
-
name: rx-buf-len
type: uint
doc: |
RX buffer length in bytes for this io_uring memory provider.
Reflects the rx_buf_len passed at io_uring zerocopy rx
registration time.
-
name: page-pool
attributes:

View File

@ -97,6 +97,8 @@ enum {
};
enum {
NETDEV_A_IO_URING_PROVIDER_INFO_RX_BUF_LEN = 1,
__NETDEV_A_IO_URING_PROVIDER_INFO_MAX,
NETDEV_A_IO_URING_PROVIDER_INFO_MAX = (__NETDEV_A_IO_URING_PROVIDER_INFO_MAX - 1)
};

View File

@ -1156,6 +1156,7 @@ static void io_pp_zc_destroy(struct page_pool *pp)
static int io_pp_nl_fill(void *mp_priv, struct sk_buff *rsp,
struct netdev_rx_queue *rxq)
{
struct io_zcrx_ifq *ifq = mp_priv;
struct nlattr *nest;
int type;
@ -1163,6 +1164,13 @@ static int io_pp_nl_fill(void *mp_priv, struct sk_buff *rsp,
nest = nla_nest_start(rsp, type);
if (!nest)
return -EMSGSIZE;
if (nla_put_uint(rsp, NETDEV_A_IO_URING_PROVIDER_INFO_RX_BUF_LEN,
1ULL << ifq->niov_shift)) {
nla_nest_cancel(rsp, nest);
return -EMSGSIZE;
}
nla_nest_end(rsp, nest);
return 0;

View File

@ -97,6 +97,8 @@ enum {
};
enum {
NETDEV_A_IO_URING_PROVIDER_INFO_RX_BUF_LEN = 1,
__NETDEV_A_IO_URING_PROVIDER_INFO_MAX,
NETDEV_A_IO_URING_PROVIDER_INFO_MAX = (__NETDEV_A_IO_URING_PROVIDER_INFO_MAX - 1)
};