mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
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:
parent
0399e68592
commit
5c4adb7fb4
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user