Lines Matching refs:param_item

127 	struct devlink_param_item *param_item;  in devlink_param_find_by_name()  local
130 xa_for_each(params, param_id, param_item) { in devlink_param_find_by_name()
131 if (!strcmp(param_item->param->name, param_name)) in devlink_param_find_by_name()
132 return param_item; in devlink_param_find_by_name()
240 struct devlink_param_item *param_item, in devlink_nl_param_fill() argument
246 const struct devlink_param *param = param_item->param; in devlink_nl_param_fill()
260 if (param_item->driverinit_value_new_valid) in devlink_nl_param_fill()
261 param_value[i] = param_item->driverinit_value_new; in devlink_nl_param_fill()
262 else if (param_item->driverinit_value_valid) in devlink_nl_param_fill()
263 param_value[i] = param_item->driverinit_value; in devlink_nl_param_fill()
333 struct devlink_param_item *param_item, in devlink_param_notify() argument
353 err = devlink_nl_param_fill(msg, devlink, port_index, param_item, cmd, in devlink_param_notify()
366 struct devlink_param_item *param_item; in devlink_params_notify() local
369 xa_for_each(&devlink->params, param_id, param_item) in devlink_params_notify()
370 devlink_param_notify(devlink, 0, param_item, cmd); in devlink_params_notify()
389 struct devlink_param_item *param_item; in devlink_nl_param_get_dump_one() local
393 xa_for_each_start(&devlink->params, param_id, param_item, state->idx) { in devlink_nl_param_get_dump_one()
394 err = devlink_nl_param_fill(msg, devlink, 0, param_item, in devlink_nl_param_get_dump_one()
506 struct devlink_param_item *param_item; in devlink_nl_param_get_doit() local
510 param_item = devlink_param_get_from_info(&devlink->params, info); in devlink_nl_param_get_doit()
511 if (!param_item) in devlink_nl_param_get_doit()
518 err = devlink_nl_param_fill(msg, devlink, 0, param_item, in devlink_nl_param_get_doit()
538 struct devlink_param_item *param_item; in __devlink_nl_cmd_param_set_doit() local
543 param_item = devlink_param_get_from_info(params, info); in __devlink_nl_cmd_param_set_doit()
544 if (!param_item) in __devlink_nl_cmd_param_set_doit()
546 param = param_item->param; in __devlink_nl_cmd_param_set_doit()
568 param_item->driverinit_value_new = value; in __devlink_nl_cmd_param_set_doit()
569 param_item->driverinit_value_new_valid = true; in __devlink_nl_cmd_param_set_doit()
580 devlink_param_notify(devlink, port_index, param_item, cmd); in __devlink_nl_cmd_param_set_doit()
626 struct devlink_param_item *param_item; in devlink_param_register() local
637 param_item = kzalloc(sizeof(*param_item), GFP_KERNEL); in devlink_param_register()
638 if (!param_item) in devlink_param_register()
641 param_item->param = param; in devlink_param_register()
643 err = xa_insert(&devlink->params, param->id, param_item, GFP_KERNEL); in devlink_param_register()
647 devlink_param_notify(devlink, 0, param_item, DEVLINK_CMD_PARAM_NEW); in devlink_param_register()
651 kfree(param_item); in devlink_param_register()
658 struct devlink_param_item *param_item; in devlink_param_unregister() local
660 param_item = devlink_param_find_by_id(&devlink->params, param->id); in devlink_param_unregister()
661 if (WARN_ON(!param_item)) in devlink_param_unregister()
663 devlink_param_notify(devlink, 0, param_item, DEVLINK_CMD_PARAM_DEL); in devlink_param_unregister()
665 kfree(param_item); in devlink_param_unregister()
772 struct devlink_param_item *param_item; in devl_param_driverinit_value_get() local
777 param_item = devlink_param_find_by_id(&devlink->params, param_id); in devl_param_driverinit_value_get()
778 if (!param_item) in devl_param_driverinit_value_get()
781 if (!param_item->driverinit_value_valid) in devl_param_driverinit_value_get()
784 if (WARN_ON(!devlink_param_cmode_is_supported(param_item->param, in devl_param_driverinit_value_get()
788 *val = param_item->driverinit_value; in devl_param_driverinit_value_get()
809 struct devlink_param_item *param_item; in devl_param_driverinit_value_set() local
813 param_item = devlink_param_find_by_id(&devlink->params, param_id); in devl_param_driverinit_value_set()
814 if (WARN_ON(!param_item)) in devl_param_driverinit_value_set()
817 if (WARN_ON(!devlink_param_cmode_is_supported(param_item->param, in devl_param_driverinit_value_set()
821 param_item->driverinit_value = init_val; in devl_param_driverinit_value_set()
822 param_item->driverinit_value_valid = true; in devl_param_driverinit_value_set()
824 devlink_param_notify(devlink, 0, param_item, DEVLINK_CMD_PARAM_NEW); in devl_param_driverinit_value_set()
830 struct devlink_param_item *param_item; in devlink_params_driverinit_load_new() local
833 xa_for_each(&devlink->params, param_id, param_item) { in devlink_params_driverinit_load_new()
834 if (!devlink_param_cmode_is_supported(param_item->param, in devlink_params_driverinit_load_new()
836 !param_item->driverinit_value_new_valid) in devlink_params_driverinit_load_new()
838 param_item->driverinit_value = param_item->driverinit_value_new; in devlink_params_driverinit_load_new()
839 param_item->driverinit_value_valid = true; in devlink_params_driverinit_load_new()
840 param_item->driverinit_value_new_valid = false; in devlink_params_driverinit_load_new()
858 struct devlink_param_item *param_item; in devl_param_value_changed() local
860 param_item = devlink_param_find_by_id(&devlink->params, param_id); in devl_param_value_changed()
861 WARN_ON(!param_item); in devl_param_value_changed()
863 devlink_param_notify(devlink, 0, param_item, DEVLINK_CMD_PARAM_NEW); in devl_param_value_changed()