netdevsim: Allow setting parent node of rate objects
authorDmytro Linkin <dlinkin@nvidia.com>
Wed, 2 Jun 2021 12:17:29 +0000 (15:17 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Jun 2021 21:08:37 +0000 (14:08 -0700)
commitf3d101b485ca2c831088d72878fe6e7416676cb8
tree359ff5269b2e4277b020e6cbe6a989fd8cbaa4c2
parentd7555984507822458b32a6405881038241d140be
netdevsim: Allow setting parent node of rate objects

Implement new devlink ops that allow setting rate node as a parent for
devlink port (leaf) or another devlink node through devlink API.
Expose parent names to netdevsim debugfs in read only mode.

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netdevsim/dev.c
drivers/net/netdevsim/netdevsim.h