linux-stable/net/devlink
Jiri Pirko 0b7a2721e3 devlink: expose peer SF devlink instance
Introduce a new helper devl_port_fn_devlink_set() to be used by driver
assigning a devlink instance to the peer devlink port function.

Expose this to user over new netlink attribute nested under port
function nest to expose devlink handle related to the port function.

This is particularly helpful for user to understand the relationship
between devlink instances created for SFs and the port functions
they belong to.

Note that caller of devlink_port_notify() needs to hold devlink
instance lock, put the assertion to devl_port_fn_devlink_set() to make
this requirement explicit. Also note the limitations that only allow to
make this assignment for registered objects.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-09-17 14:01:47 +01:00
..
core.c devlink: introduce object and nested devlink relationship infra 2023-09-17 14:01:47 +01:00
dev.c devlink: introduce object and nested devlink relationship infra 2023-09-17 14:01:47 +01:00
devl_internal.h devlink: introduce object and nested devlink relationship infra 2023-09-17 14:01:47 +01:00
dpipe.c devlink: push dpipe related code into separate file 2023-08-28 08:02:22 -07:00
health.c genetlink: use attrs from struct genl_info 2023-08-15 15:00:45 -07:00
linecard.c devlink: extend devlink_nl_put_nested_handle() with attrtype arg 2023-09-17 14:01:46 +01:00
Makefile devlink: move devlink_notify_register/unregister() to dev.c 2023-08-28 08:02:24 -07:00
netlink.c devlink: extend devlink_nl_put_nested_handle() with attrtype arg 2023-09-17 14:01:46 +01:00
netlink_gen.c netlink: specs: devlink: extend health reporter dump attributes by port index 2023-08-14 11:47:25 -07:00
netlink_gen.h netlink: specs: devlink: add commands that do per-instance dump 2023-08-14 11:47:25 -07:00
param.c devlink: push param related code into separate file 2023-08-28 08:02:22 -07:00
port.c devlink: expose peer SF devlink instance 2023-09-17 14:01:47 +01:00
rate.c devlink: push rate related code into separate file 2023-08-28 08:02:23 -07:00
region.c devlink: push region related code into separate file 2023-08-28 08:02:23 -07:00
resource.c devlink: push resource related code into separate file 2023-08-28 08:02:22 -07:00
sb.c devlink: push shared buffer related code into separate file 2023-08-28 08:02:22 -07:00
trap.c devlink: push trap related code into separate file 2023-08-28 08:02:23 -07:00