devlink: introduce port ops placeholder
authorJiri Pirko <jiri@nvidia.com>
Fri, 26 May 2023 10:28:27 +0000 (12:28 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 30 May 2023 17:32:19 +0000 (10:32 -0700)
commit6acdf43d8abe32082356d56a07598e513bbb59f4
tree2206cd6c2156ab2cd27541ef14ad2744cc5dd0be
parentbc638eabfed90fdc798fd5765e67e41abea76152
devlink: introduce port ops placeholder

In devlink, some of the objects have separate ops registered alongside
with the object itself. Port however have ops in devlink_ops structure.
For drivers what register multiple kinds of ports with different ops
this is not convenient. Introduce devlink_port_ops and a set
of functions that allow drivers to pass ops pointer during
port registration.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/devlink.h
net/devlink/leftover.c