Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	andrew+netdev@lunn.ch, horms@kernel.org, corbet@lwn.net,
	vladimir.oltean@nxp.com, willemb@google.com,
	sdf.kernel@gmail.com, ecree.xilinx@gmail.com,
	jesse.brandeburg@intel.com, linux-doc@vger.kernel.org,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 05/10] docs: net: fix minor issues with the NAPI guide
Date: Tue, 26 May 2026 09:01:46 -0700	[thread overview]
Message-ID: <20260526160151.2793354-6-kuba@kernel.org> (raw)
In-Reply-To: <20260526160151.2793354-1-kuba@kernel.org>

Update the NAPI documentation to match current API behavior:

- repeated napi_disable() calls hang waiting for ownership, rather
  than deadlock
- NAPI IDs are exposed through SO_INCOMING_NAPI_ID and netdev Netlink
- epoll uses the maxevents parameter spelling
- add that drivers holding the netdev instance lock may need _locked()
  variants

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 Documentation/networking/napi.rst | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Documentation/networking/napi.rst b/Documentation/networking/napi.rst
index 4e008efebb35..c719924f36ce 100644
--- a/Documentation/networking/napi.rst
+++ b/Documentation/networking/napi.rst
@@ -49,7 +49,11 @@ instance to be released.
 The control APIs are not idempotent. Control API calls are safe against
 concurrent use of datapath APIs but an incorrect sequence of control API
 calls may result in crashes, deadlocks, or race conditions. For example,
-calling napi_disable() multiple times in a row will deadlock.
+calling napi_disable() multiple times in a row will hang waiting for
+ownership of the NAPI instance to be released.
+
+Drivers using the netdev instance lock may need to use the ``_locked()``
+variants of the control APIs when that lock is already held.
 
 Datapath API
 ------------
@@ -190,7 +194,8 @@ 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.
+are visible to the user through the ``SO_INCOMING_NAPI_ID`` socket option
+and the netdev Netlink API.
 
 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
@@ -371,7 +376,7 @@ efficiency.
      the application has stalled. This value should be chosen so that it covers
      the amount of time the user application needs to process data from its
      call to epoll_wait, noting that applications can control how much data
-     they retrieve by setting ``max_events`` when calling epoll_wait.
+     they retrieve by setting ``maxevents`` when calling epoll_wait.
 
   2. The sysfs parameter or per-NAPI config parameters ``gro_flush_timeout``
      and ``napi_defer_hard_irqs`` can be set to low values. They will be used
-- 
2.54.0


  parent reply	other threads:[~2026-05-26 16:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 16:01 [PATCH net-next 00/10] docs: net: updates for old and cobwebbed docs Jakub Kicinski
2026-05-26 16:01 ` [PATCH net-next 01/10] docs: net: netdevices: small fixes and clarifications Jakub Kicinski
2026-05-26 22:12   ` Stanislav Fomichev
2026-05-26 16:01 ` [PATCH net-next 02/10] docs: net: fix minor issues with driver guide Jakub Kicinski
2026-05-26 16:01 ` [PATCH net-next 03/10] docs: net: statistics: fix kernel-internal stats list Jakub Kicinski
2026-05-26 16:01 ` [PATCH net-next 04/10] docs: net: update devmem code examples Jakub Kicinski
2026-05-26 22:17   ` Stanislav Fomichev
2026-05-26 16:01 ` Jakub Kicinski [this message]
2026-05-26 16:01 ` [PATCH net-next 06/10] docs: net: refresh netdev feature guidance Jakub Kicinski
2026-05-26 18:41   ` Maxime Chevallier
2026-05-26 22:35     ` Jakub Kicinski
2026-05-26 16:01 ` [PATCH net-next 07/10] docs: net: fix minor issues with checksum offloads Jakub Kicinski
2026-05-26 16:01 ` [PATCH net-next 08/10] docs: net: add Rx notes to the checksum guide Jakub Kicinski
2026-05-26 18:56   ` Willem de Bruijn
2026-05-26 16:01 ` [PATCH net-next 09/10] docs: net: render the checksum comment in checksum-offloads.rst Jakub Kicinski
2026-05-26 18:56   ` Willem de Bruijn
2026-05-26 16:01 ` [PATCH net-next 10/10] docs: net: fix minor issues with segmentation offloads Jakub Kicinski
2026-05-26 18:48 ` [PATCH net-next 00/10] docs: net: updates for old and cobwebbed docs Randy Dunlap
2026-05-26 22:37   ` Jakub Kicinski
2026-05-26 22:40     ` Jakub Kicinski
2026-05-27  0:51       ` Randy Dunlap
2026-05-27  1:15         ` Jakub Kicinski
2026-05-27  2:39           ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260526160151.2793354-6-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf.kernel@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox