Lines Matching refs:devlink

22 devlink_rate_leaf_get_from_info(struct devlink *devlink, struct genl_info *info)  in devlink_rate_leaf_get_from_info()  argument
27 devlink_port = devlink_port_get_from_attrs(devlink, info->attrs); in devlink_rate_leaf_get_from_info()
35 devlink_rate_node_get_by_name(struct devlink *devlink, const char *node_name) in devlink_rate_node_get_by_name() argument
39 list_for_each_entry(devlink_rate, &devlink->rate_list, list) { in devlink_rate_node_get_by_name()
48 devlink_rate_node_get_from_attrs(struct devlink *devlink, struct nlattr **attrs) in devlink_rate_node_get_from_attrs() argument
61 return devlink_rate_node_get_by_name(devlink, rate_node_name); in devlink_rate_node_get_from_attrs()
65 devlink_rate_node_get_from_info(struct devlink *devlink, struct genl_info *info) in devlink_rate_node_get_from_info() argument
67 return devlink_rate_node_get_from_attrs(devlink, info->attrs); in devlink_rate_node_get_from_info()
71 devlink_rate_get_from_info(struct devlink *devlink, struct genl_info *info) in devlink_rate_get_from_info() argument
76 return devlink_rate_leaf_get_from_info(devlink, info); in devlink_rate_get_from_info()
78 return devlink_rate_node_get_from_info(devlink, info); in devlink_rate_get_from_info()
88 struct devlink *devlink = devlink_rate->devlink; in devlink_nl_rate_fill() local
95 if (devlink_nl_put_handle(msg, devlink)) in devlink_nl_rate_fill()
143 struct devlink *devlink = devlink_rate->devlink; in devlink_rate_notify() local
149 if (!devl_is_registered(devlink) || !devlink_nl_notify_need(devlink)) in devlink_rate_notify()
162 devlink_nl_notify_send(devlink, msg); in devlink_rate_notify()
165 void devlink_rates_notify_register(struct devlink *devlink) in devlink_rates_notify_register() argument
169 list_for_each_entry(rate_node, &devlink->rate_list, list) in devlink_rates_notify_register()
173 void devlink_rates_notify_unregister(struct devlink *devlink) in devlink_rates_notify_unregister() argument
177 list_for_each_entry_reverse(rate_node, &devlink->rate_list, list) in devlink_rates_notify_unregister()
182 devlink_nl_rate_get_dump_one(struct sk_buff *msg, struct devlink *devlink, in devlink_nl_rate_get_dump_one() argument
190 list_for_each_entry(devlink_rate, &devlink->rate_list, list) { in devlink_nl_rate_get_dump_one()
217 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_rate_get_doit() local
222 devlink_rate = devlink_rate_get_from_info(devlink, info); in devlink_nl_rate_get_doit()
258 struct devlink *devlink = devlink_rate->devlink; in devlink_nl_rate_parent_node_set() local
260 const struct devlink_ops *ops = devlink->ops; in devlink_nl_rate_parent_node_set()
282 parent = devlink_rate_node_get_by_name(devlink, parent_name); in devlink_nl_rate_parent_node_set()
462 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_rate_set_doit() local
467 devlink_rate = devlink_rate_get_from_info(devlink, info); in devlink_nl_rate_set_doit()
471 ops = devlink->ops; in devlink_nl_rate_set_doit()
484 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_rate_new_doit() local
489 ops = devlink->ops; in devlink_nl_rate_new_doit()
498 rate_node = devlink_rate_node_get_from_attrs(devlink, info->attrs); in devlink_nl_rate_new_doit()
508 rate_node->devlink = devlink; in devlink_nl_rate_new_doit()
525 list_add(&rate_node->list, &devlink->rate_list); in devlink_nl_rate_new_doit()
540 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_rate_del_doit() local
544 rate_node = devlink_rate_node_get_from_info(devlink, info); in devlink_nl_rate_del_doit()
554 err = devlink->ops->rate_node_del(rate_node, rate_node->priv, in devlink_nl_rate_del_doit()
564 int devlink_rate_nodes_check(struct devlink *devlink, u16 mode, in devlink_rate_nodes_check() argument
569 list_for_each_entry(devlink_rate, &devlink->rate_list, list) in devlink_rate_nodes_check()
587 devl_rate_node_create(struct devlink *devlink, void *priv, char *node_name, in devl_rate_node_create() argument
592 rate_node = devlink_rate_node_get_by_name(devlink, node_name); in devl_rate_node_create()
606 rate_node->devlink = devlink; in devl_rate_node_create()
616 list_add(&rate_node->list, &devlink->rate_list); in devl_rate_node_create()
633 struct devlink *devlink = devlink_port->devlink; in devl_rate_leaf_create() local
636 devl_assert_locked(devlink_port->devlink); in devl_rate_leaf_create()
651 devlink_rate->devlink = devlink; in devl_rate_leaf_create()
654 list_add_tail(&devlink_rate->list, &devlink->rate_list); in devl_rate_leaf_create()
673 devl_assert_locked(devlink_port->devlink); in devl_rate_leaf_destroy()
693 void devl_rate_nodes_destroy(struct devlink *devlink) in devl_rate_nodes_destroy() argument
696 const struct devlink_ops *ops = devlink->ops; in devl_rate_nodes_destroy()
698 devl_assert_locked(devlink); in devl_rate_nodes_destroy()
700 list_for_each_entry(devlink_rate, &devlink->rate_list, list) { in devl_rate_nodes_destroy()
712 list_for_each_entry_safe(devlink_rate, tmp, &devlink->rate_list, list) { in devl_rate_nodes_destroy()