summaryrefslogtreecommitdiff
path: root/drivers/net/netdevsim
diff options
context:
space:
mode:
authorDmytro Linkin <dlinkin@nvidia.com>2021-06-02 15:17:22 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-03 00:08:37 +0300
commit1897db2ec3109eb1dd07b357c95c5e03d54e41b9 (patch)
tree6706a5c71aaa0e2464ff49186f03fd41cc93cb02 /drivers/net/netdevsim
parenta27d8e352bf252eb44b04c9e628a8d759956bdd2 (diff)
downloadlinux-1897db2ec3109eb1dd07b357c95c5e03d54e41b9.tar.xz
devlink: Allow setting tx rate for devlink rate leaf objects
Implement support for DEVLINK_CMD_RATE_SET command with new attributes DEVLINK_ATTR_RATE_TX_{SHARE|MAX} that are used to set devlink rate shared/max tx rate values. Extend devlink ops with new callbacks rate_leaf_tx_{share|max}_set() to allow supporting drivers to implement rate control through devlink. New attributes are optional. Driver implementations are allowed to support either or both of them. Shared rate example: $ devlink port function rate set netdevsim/netdevsim10/0 tx_share 10mbit $ devlink port function rate show netdevsim/netdevsim10/0 netdevsim/netdevsim10/0: type leaf tx_share 10mbit Max rate example: $ devlink port function rate set netdevsim/netdevsim10/0 tx_max 100mbit $ devlink port function rate show netdevsim/netdevsim10/0 netdevsim/netdevsim10/0: type leaf tx_max 100mbit 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>
Diffstat (limited to 'drivers/net/netdevsim')
0 files changed, 0 insertions, 0 deletions