[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAfAvxX707BGyLOZ@mini-arch>
Date: Tue, 22 Apr 2025 09:15:59 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
donald.hunter@...il.com, sdf@...ichev.me, almasrymina@...gle.com,
dw@...idwei.uk, asml.silence@...il.com, ap420073@...il.com,
jdamato@...tly.com, dtatulea@...dia.com, michael.chan@...adcom.com
Subject: Re: [RFC net-next 17/22] netdev: add support for setting rx-buf-len
per queue
On 04/21, Jakub Kicinski wrote:
> Zero-copy APIs increase the cost of buffer management. They also extend
> this cost to user space applications which may be used to dealing with
> much larger buffers. Allow setting rx-buf-len per queue, devices with
> HW-GRO support can commonly fill buffers up to 32k (or rather 64k - 1
> but that's not a power of 2..)
>
> The implementation adds a new option to the netdev netlink, rather
> than ethtool. The NIC-wide setting lives in ethtool ringparams so
> one could argue that we should be extending the ethtool API.
> OTOH netdev API is where we already have queue-get, and it's how
> zero-copy applications bind memory providers.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> Documentation/netlink/specs/netdev.yaml | 15 ++++
> include/net/netdev_queues.h | 5 ++
> include/net/netlink.h | 19 +++++
> include/uapi/linux/netdev.h | 2 +
> net/core/netdev-genl-gen.h | 1 +
> tools/include/uapi/linux/netdev.h | 2 +
> net/core/netdev-genl-gen.c | 15 ++++
> net/core/netdev-genl.c | 92 +++++++++++++++++++++++++
> net/core/netdev_config.c | 16 +++++
> 9 files changed, 167 insertions(+)
>
> diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
> index f5e0750ab71d..b0dfa970ee83 100644
> --- a/Documentation/netlink/specs/netdev.yaml
> +++ b/Documentation/netlink/specs/netdev.yaml
> @@ -324,6 +324,10 @@ name: netdev
> doc: XSK information for this queue, if any.
> type: nest
> nested-attributes: xsk-info
> + -
> + name: rx-buf-len
> + doc: Per-queue configuration of ETHTOOL_A_RINGS_RX_BUF_LEN.
> + type: u32
> -
> name: qstats
> doc: |
> @@ -743,6 +747,17 @@ name: netdev
> - defer-hard-irqs
> - gro-flush-timeout
> - irq-suspend-timeout
> + -
> + name: queue-set
> + doc: Set per-queue configurable options.
> + attribute-set: queue
> + do:
> + request:
> + attributes:
> + - ifindex
> + - type
> + - id
> + - rx-buf-len
Do we want some guidance going forward on what belongs to queue-set
vs napi-set? (mostly) HW settings for the queue-set and (mostly) SW
settings for (serving the queues) in napi-set?
Powered by blists - more mailing lists