[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z6bWZkf-xm0EB6uD@archie.me>
Date: Sat, 8 Feb 2025 10:58:30 +0700
From: Bagas Sanjaya <bagasdotme@...il.com>
To: Joe Damato <jdamato@...tly.com>, netdev@...r.kernel.org
Cc: ahmed.zaki@...el.com, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Jonathan Corbet <corbet@....net>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] documentation: networking: Add NAPI config
On Sat, Feb 08, 2025 at 01:28:21AM +0000, Joe Damato wrote:
> diff --git a/Documentation/networking/napi.rst b/Documentation/networking/napi.rst
> index f970a2be271a..de146f63f09b 100644
> --- a/Documentation/networking/napi.rst
> +++ b/Documentation/networking/napi.rst
> @@ -171,12 +171,42 @@ a channel as an IRQ/NAPI which services queues of a given type. For example,
> a configuration of 1 ``rx``, 1 ``tx`` and 1 ``combined`` channel is expected
> to utilize 3 interrupts, 2 Rx and 2 Tx queues.
>
> +Persistent NAPI config
> +----------------------
> +
> +Drivers can opt-in to using a persistent NAPI configuration space by calling
> +netif_napi_add_config. This API maps a NAPI instance to a configuration
> +structure using a driver defined index value, like a queue number. If the
> +driver were to destroy and recreate NAPI instances (if a user requested a queue
> +count change, for example), the new NAPI instances will inherit the configuration
> +settings of the NAPI configuration structure they are mapped to.
> +
> +Using this API allows for persistent NAPI IDs (among other settings), which can
> +be beneficial to userspace programs using ``SO_INCOMING_NAPI_ID``. See the
> +sections below for other NAPI configuration settings.
> +
> User API
> ========
>
> User interactions with NAPI depend on NAPI instance ID. The instance IDs
> are only visible to the user thru the ``SO_INCOMING_NAPI_ID`` socket option.
> -It's not currently possible to query IDs used by a given device.
> +
> +Users can query NAPI IDs for a device or device queue using netlink. This can
> +be done programmatically in a user application or by using a script included in
> +the kernel source tree: ``tools/net/ynl/pyynl/cli.py``.
> +
> +For example, using the script to dump all of the queues for a device (which
> +will reveal each queue's NAPI ID):
> +
> +.. code-block:: bash
> +
> + $ kernel-source/tools/net/ynl/pyynl/cli.py \
> + --spec Documentation/netlink/specs/netdev.yaml \
> + --dump queue-get \
> + --json='{"ifindex": 2}'
> +
> +See ``Documentation/netlink/specs/netdev.yaml`` for more details on
> +available operations and attributes.
>
> Software IRQ coalescing
> -----------------------
>
Looks good, thanks!
Reviewed-by: Bagas Sanjaya <bagasdotme@...il.com>
--
An old man doll... just what I always wanted! - Clara
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists