Skip to content

Commit 11c668d

Browse files
author
Paolo Abeni
committed
Merge branch 'net-make-sure-we-retain-napi-ordering-on-netdev-napi_list'
Jakub Kicinski says: ==================== net: make sure we retain NAPI ordering on netdev->napi_list I promised Eric to remove the rtnl protection of the NAPI list, when I sat down to implement it over the break I realized that the recently added NAPI ID retention will break the list ordering assumption we have in netlink dump. The ordering used to happen "naturally", because we'd always add NAPIs that the head of the list, and assign a new monotonically increasing ID. Before the first patch of this series we'd still only add at the head of the list but now the newly added NAPI may inherit from its config an ID lower than something else already on the list. The fix is in the first patch, the rest is netdevsim churn to test it. I'm posting this for net-next, because AFAICT the problem can't be triggered in net, given the very limited queue API adoption. v2: - [patch 2] allocate the array with kcalloc() instead of kvcalloc() - [patch 2] set GFP_KERNEL_ACCOUNT when allocating queues - [patch 6] don't null-check page pool before page_pool_destroy() - [patch 6] controled -> controlled - [patch 7] change mode to 0200 - [patch 7] reorder removal to be inverse of add - [patch 7] fix the spaces vs tabs v1: https://lore.kernel.org/[email protected] ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
2 parents a3b3d2d + eb721f1 commit 11c668d

File tree

6 files changed

+294
-42
lines changed

6 files changed

+294
-42
lines changed

Documentation/networking/netdevices.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,3 +297,13 @@ napi->poll:
297297
Context:
298298
softirq
299299
will be called with interrupts disabled by netconsole.
300+
301+
NETDEV_INTERNAL symbol namespace
302+
================================
303+
304+
Symbols exported as NETDEV_INTERNAL can only be used in networking
305+
core and drivers which exclusively flow via the main networking list and trees.
306+
Note that the inverse is not true, most symbols outside of NETDEV_INTERNAL
307+
are not expected to be used by random code outside netdev either.
308+
Symbols may lack the designation because they predate the namespaces,
309+
or simply due to an oversight.

0 commit comments

Comments
 (0)