Thread (22 messages) 22 messages, 4 authors, 2025-11-25

Re: [PATCH net-next 08/14] devlink: Allow rate node parents from other devlinks

From: Jiri Pirko <jiri@resnulli.us>
Date: 2025-11-20 14:55:50
Also in: linux-doc, linux-rdma, lkml

Thu, Nov 20, 2025 at 02:09:20PM +0100, tariqt@nvidia.com wrote:
From: Cosmin Ratiu <redacted>

This commit makes use of the building blocks previously added to
implement cross-device rate nodes.

A new 'supported_cross_device_rate_nodes' bool is added to devlink_ops
which lets drivers advertise support for cross-device rate objects.
If enabled and if there is a common shared devlink instance, then:
- all rate objects will be stored in the top-most common nested instance
 and
- rate objects can have parents from other devices sharing the same
 common instance.

The parent devlink from info->user_ptr[1] is not locked, so none of its
mutable fields can be used. But parent setting only requires comparing
devlink pointer comparisons. Additionally, since the shared devlink is
locked, other rate operations cannot concurrently happen.

The rate lock/unlock functions are now exported, so that drivers
implementing this can protect against concurrent modifications on any
shared device structures.

Signed-off-by: Cosmin Ratiu <redacted>
Reviewed-by: Carolina Jubran <redacted>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Jiri Pirko <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help