|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5 |
|
| #
da3ee3cd |
| 23-Oct-2024 |
Przemek Kitszel <[email protected]> |
devlink: introduce devlink_nl_put_u64()
Add devlink_nl_put_u64() that abstracts padding for u64 values. All u64 values are passed with the very same padding option.
Reviewed-by: Wojciech Drewek <wo
devlink: introduce devlink_nl_put_u64()
Add devlink_nl_put_u64() that abstracts padding for u64 values. All u64 values are passed with the very same padding option.
Reviewed-by: Wojciech Drewek <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Reviewed-by: Joe Damato <[email protected]> Signed-off-by: Przemek Kitszel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc4, v6.12-rc3 |
|
| #
13d68a16 |
| 09-Oct-2024 |
Paolo Abeni <[email protected]> |
genetlink: extend info user-storage to match NL cb ctx
This allows a more uniform implementation of non-dump and dump operations, and will be used later in the series to avoid some per-operation all
genetlink: extend info user-storage to match NL cb ctx
This allows a more uniform implementation of non-dump and dump operations, and will be used later in the series to avoid some per-operation allocation.
Additionally rename the NL_ASSERT_DUMP_CTX_FITS macro, to fit a more extended usage.
Suggested-by: Jakub Kicinski <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> Link: https://patch.msgid.link/1130cc2896626b84587a2a5f96a5c6829638f4da.1728460186.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6 |
|
| #
ded6f77c |
| 16-Dec-2023 |
Jiri Pirko <[email protected]> |
devlink: extend multicast filtering by port index
Expose the previously introduced notification multicast messages filtering infrastructure and allow the user to select messages using port index.
S
devlink: extend multicast filtering by port index
Expose the previously introduced notification multicast messages filtering infrastructure and allow the user to select messages using port index.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
13b127d2 |
| 16-Dec-2023 |
Jiri Pirko <[email protected]> |
devlink: add a command to set notification filter and use it for multicasts
Currently the user listening on a socket for devlink notifications gets always all messages for all existing instances, ev
devlink: add a command to set notification filter and use it for multicasts
Currently the user listening on a socket for devlink notifications gets always all messages for all existing instances, even if he is interested only in one of those. That may cause unnecessary overhead on setups with thousands of instances present.
User is currently able to narrow down the devlink objects replies to dump commands by specifying select attributes.
Allow similar approach for notifications. Introduce a new devlink NOTIFY_FILTER_SET which the user passes the select attributes. Store these per-socket and use them for filtering messages during multicast send.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
5648de0b |
| 16-Dec-2023 |
Jiri Pirko <[email protected]> |
devlink: introduce a helper for netlink multicast send
Introduce a helper devlink_nl_notify_send() so each object notification function does not have to call genlmsg_multicast_netns() with the same
devlink: introduce a helper for netlink multicast send
Introduce a helper devlink_nl_notify_send() so each object notification function does not have to call genlmsg_multicast_netns() with the same arguments.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
cddbff47 |
| 16-Dec-2023 |
Jiri Pirko <[email protected]> |
devlink: send notifications only if there are listeners
Introduce devlink_nl_notify_need() helper and using it to check at the beginning of notification functions to avoid overhead of composing noti
devlink: send notifications only if there are listeners
Introduce devlink_nl_notify_need() helper and using it to check at the beginning of notification functions to avoid overhead of composing notification messages in case nobody listens.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
11280dde |
| 16-Dec-2023 |
Jiri Pirko <[email protected]> |
devlink: introduce __devl_is_registered() helper and use it instead of xa_get_mark()
Introduce __devl_is_registered() which does not assert on devlink instance lock and use it in notifications which
devlink: introduce __devl_is_registered() helper and use it instead of xa_get_mark()
Introduce __devl_is_registered() which does not assert on devlink instance lock and use it in notifications which may be called without devlink instance lock held.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2 |
|
| #
d32c3825 |
| 15-Nov-2023 |
Ido Schimmel <[email protected]> |
devlink: Allow taking device lock in pre_doit operations
Introduce a new private flag ('DEVLINK_NL_FLAG_NEED_DEV_LOCK') to allow netlink commands to specify that they need to acquire the device lock
devlink: Allow taking device lock in pre_doit operations
Introduce a new private flag ('DEVLINK_NL_FLAG_NEED_DEV_LOCK') to allow netlink commands to specify that they need to acquire the device lock in their pre_doit operation and release it in their post_doit operation.
The reload command will use this flag in the subsequent patch.
No functional changes intended.
Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
e21c52d7 |
| 15-Nov-2023 |
Ido Schimmel <[email protected]> |
devlink: Acquire device lock during netns dismantle
Device drivers register with devlink from their probe routines (under the device lock) by acquiring the devlink instance lock and calling devl_reg
devlink: Acquire device lock during netns dismantle
Device drivers register with devlink from their probe routines (under the device lock) by acquiring the devlink instance lock and calling devl_register().
Drivers that support a devlink reload usually implement the reload_{down, up}() operations in a similar fashion to their remove and probe routines, respectively.
However, while the remove and probe routines are invoked with the device lock held, the reload operations are only invoked with the devlink instance lock held. It is therefore impossible for drivers to acquire the device lock from their reload operations, as this would result in lock inversion.
The motivating use case for invoking the reload operations with the device lock held is in mlxsw which needs to trigger a PCI reset as part of the reload. The driver cannot call pci_reset_function() as this function acquires the device lock. Instead, it needs to call __pci_reset_function_locked which expects the device lock to be held.
To that end, adjust devlink to always acquire the device lock before the devlink instance lock when performing a reload.
For now, only do that when reload is triggered as part of netns dismantle. Subsequent patches will handle the case where reload is explicitly triggered by user space.
Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
526dd6d7 |
| 15-Nov-2023 |
Ido Schimmel <[email protected]> |
devlink: Move private netlink flags to C file
The flags are not used outside of the C file so move them there.
Suggested-by: Jiri Pirko <[email protected]> Signed-off-by: Ido Schimmel <idosch@nvidia.
devlink: Move private netlink flags to C file
The flags are not used outside of the C file so move them there.
Suggested-by: Jiri Pirko <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc1, v6.6, v6.6-rc7 |
|
| #
15c80e7a |
| 21-Oct-2023 |
Jiri Pirko <[email protected]> |
devlink: remove duplicated netlink callback prototypes
The prototypes are now generated, remove the old ones.
Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Jacob Keller <jacob.e.keller@i
devlink: remove duplicated netlink callback prototypes
The prototypes are now generated, remove the old ones.
Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
53590934 |
| 21-Oct-2023 |
Jiri Pirko <[email protected]> |
devlink: rename netlink callback to be aligned with the generated ones
All remaining doit and dumpit netlink callback functions are going to be used by generated split ops. They expect certain name
devlink: rename netlink callback to be aligned with the generated ones
All remaining doit and dumpit netlink callback functions are going to be used by generated split ops. They expect certain name format. Rename the callback to be aligned with generated names.
Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2 |
|
| #
c5e1bf8a |
| 13-Sep-2023 |
Jiri Pirko <[email protected]> |
devlink: introduce possibility to expose info about nested devlinks
In mlx5, there is a devlink instance created for PCI device. Also, one separate devlink instance is created for auxiliary device t
devlink: introduce possibility to expose info about nested devlinks
In mlx5, there is a devlink instance created for PCI device. Also, one separate devlink instance is created for auxiliary device that represents the netdev of uplink port. This relation is currently invisible to the devlink user.
Benefit from the rel infrastructure and allow for nested devlink instance to set the relationship for the nested-in devlink instance. Note that there may be many nested instances, therefore use xarray to hold the list of rel_indexes for individual nested instances.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
c137743b |
| 13-Sep-2023 |
Jiri Pirko <[email protected]> |
devlink: introduce object and nested devlink relationship infra
It is a bit tricky to maintain relationship between devlink objects and nested devlink instances due to following aspects:
1) Locking
devlink: introduce object and nested devlink relationship infra
It is a bit tricky to maintain relationship between devlink objects and nested devlink instances due to following aspects:
1) Locking. It is necessary to lock the devlink instance that contains the object first, only after that to lock the nested instance. 2) Lifetimes. Objects (e.g devlink port) may be removed before the nested devlink instance. 3) Notifications. If nested instance changes (e.g. gets registered/unregistered) the nested-in object needs to send appropriate notifications.
Resolve this by introducing an xarray that holds 1:1 relationships between devlink object and related nested devlink instance. Use that xarray index to get the object/nested devlink instance on the other side.
Provide necessary helpers: devlink_rel_nested_in_add/clear() to add and clear the relationship. devlink_rel_nested_in_notify() to call the nested-in object to send notifications during nested instance register/unregister/netns change. devlink_rel_devlink_handle_put() to be used by nested-in object fill function to fill the nested handle.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
1c2197c4 |
| 13-Sep-2023 |
Jiri Pirko <[email protected]> |
devlink: extend devlink_nl_put_nested_handle() with attrtype arg
As the next patch is going to call this helper with need to fill another type of nested attribute, pass it over function arg.
Signed
devlink: extend devlink_nl_put_nested_handle() with attrtype arg
As the next patch is going to call this helper with need to fill another type of nested attribute, pass it over function arg.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
af1f1400 |
| 13-Sep-2023 |
Jiri Pirko <[email protected]> |
devlink: move devlink_nl_put_nested_handle() into netlink.c
As the next patch is going to call this helper out of the linecard.c, move to netlink.c.
Signed-off-by: Jiri Pirko <[email protected]> Sign
devlink: move devlink_nl_put_nested_handle() into netlink.c
As the next patch is going to call this helper out of the linecard.c, move to netlink.c.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
d0b7e990 |
| 13-Sep-2023 |
Jiri Pirko <[email protected]> |
devlink: move linecard struct into linecard.c
Instead of exposing linecard struct, expose a simple helper to get the linecard index, which is all is needed outside linecard.c. Move the linecard stru
devlink: move linecard struct into linecard.c
Instead of exposing linecard struct, expose a simple helper to get the linecard index, which is all is needed outside linecard.c. Move the linecard struct to linecard.c and keep it private similar to the rest of the devlink objects.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.6-rc1 |
|
| #
71179ac5 |
| 28-Aug-2023 |
Jiri Pirko <[email protected]> |
devlink: move devlink_notify_register/unregister() to dev.c
At last, move the last bits out of leftover.c, the devlink_notify_register/unregister() functions to dev.c
Signed-off-by: Jiri Pirko <jir
devlink: move devlink_notify_register/unregister() to dev.c
At last, move the last bits out of leftover.c, the devlink_notify_register/unregister() functions to dev.c
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
29a390d1 |
| 28-Aug-2023 |
Jiri Pirko <[email protected]> |
devlink: move small_ops definition into netlink.c
Move the generic netlink small_ops definition where they are consumed, into netlink.c
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lor
devlink: move small_ops definition into netlink.c
Move the generic netlink small_ops definition where they are consumed, into netlink.c
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
9edbe6f3 |
| 28-Aug-2023 |
Jiri Pirko <[email protected]> |
devlink: push linecard related code into separate file
Cut out another chunk from leftover.c and put linecard related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: ht
devlink: push linecard related code into separate file
Cut out another chunk from leftover.c and put linecard related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
7cc7194e |
| 28-Aug-2023 |
Jiri Pirko <[email protected]> |
devlink: push rate related code into separate file
Cut out another chunk from leftover.c and put rate related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lo
devlink: push rate related code into separate file
Cut out another chunk from leftover.c and put rate related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
4bbdec80 |
| 28-Aug-2023 |
Jiri Pirko <[email protected]> |
devlink: push trap related code into separate file
Cut out another chunk from leftover.c and put trap related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lo
devlink: push trap related code into separate file
Cut out another chunk from leftover.c and put trap related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
1aa47ca1 |
| 28-Aug-2023 |
Jiri Pirko <[email protected]> |
devlink: push region related code into separate file
Cut out another chunk from leftover.c and put region related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: https:
devlink: push region related code into separate file
Cut out another chunk from leftover.c and put region related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
830c41e1 |
| 28-Aug-2023 |
Jiri Pirko <[email protected]> |
devlink: push param related code into separate file
Cut out another chunk from leftover.c and put param related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: https://
devlink: push param related code into separate file
Cut out another chunk from leftover.c and put param related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
a9f96007 |
| 28-Aug-2023 |
Jiri Pirko <[email protected]> |
devlink: push resource related code into separate file
Cut out another chunk from leftover.c and put resource related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: ht
devlink: push resource related code into separate file
Cut out another chunk from leftover.c and put resource related code into a separate file.
Signed-off-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|