Lines Matching full:devlink

9 #include <trace/events/devlink.h>
59 struct devlink *devlink; member
94 devlink_health_reporter_find_by_name(struct devlink *devlink, in devlink_health_reporter_find_by_name() argument
97 return __devlink_health_reporter_find_by_name(&devlink->reporter_list, in devlink_health_reporter_find_by_name()
110 __devlink_health_reporter_create(struct devlink *devlink, in __devlink_health_reporter_create() argument
128 reporter->devlink = devlink; in __devlink_health_reporter_create()
137 * devl_port_health_reporter_create() - create devlink health reporter for
141 * @ops: devlink health reporter ops
151 devl_assert_locked(port->devlink); in devl_port_health_reporter_create()
157 reporter = __devlink_health_reporter_create(port->devlink, ops, priv); in devl_port_health_reporter_create()
173 struct devlink *devlink = port->devlink; in devlink_port_health_reporter_create() local
175 devl_lock(devlink); in devlink_port_health_reporter_create()
177 devl_unlock(devlink); in devlink_port_health_reporter_create()
183 * devl_health_reporter_create - create devlink health reporter
185 * @devlink: devlink instance which the health reports will relate
186 * @ops: devlink health reporter ops
190 devl_health_reporter_create(struct devlink *devlink, in devl_health_reporter_create() argument
196 devl_assert_locked(devlink); in devl_health_reporter_create()
198 if (devlink_health_reporter_find_by_name(devlink, ops->name)) in devl_health_reporter_create()
201 reporter = __devlink_health_reporter_create(devlink, ops, priv); in devl_health_reporter_create()
205 list_add_tail(&reporter->list, &devlink->reporter_list); in devl_health_reporter_create()
211 devlink_health_reporter_create(struct devlink *devlink, in devlink_health_reporter_create() argument
217 devl_lock(devlink); in devlink_health_reporter_create()
218 reporter = devl_health_reporter_create(devlink, ops, priv); in devlink_health_reporter_create()
219 devl_unlock(devlink); in devlink_health_reporter_create()
233 * devl_health_reporter_destroy() - destroy devlink health reporter
235 * @reporter: devlink health reporter to destroy
240 devl_assert_locked(reporter->devlink); in devl_health_reporter_destroy()
250 struct devlink *devlink = reporter->devlink; in devlink_health_reporter_destroy() local
252 devl_lock(devlink); in devlink_health_reporter_destroy()
254 devl_unlock(devlink); in devlink_health_reporter_destroy()
264 struct devlink *devlink = reporter->devlink; in devlink_nl_health_reporter_fill() local
272 if (devlink_nl_put_handle(msg, devlink)) in devlink_nl_health_reporter_fill()
332 devlink_health_reporter_get_from_attrs(struct devlink *devlink, in devlink_health_reporter_get_from_attrs() argument
342 devlink_port = devlink_port_get_from_attrs(devlink, attrs); in devlink_health_reporter_get_from_attrs()
344 return devlink_health_reporter_find_by_name(devlink, in devlink_health_reporter_get_from_attrs()
352 devlink_health_reporter_get_from_info(struct devlink *devlink, in devlink_health_reporter_get_from_info() argument
355 return devlink_health_reporter_get_from_attrs(devlink, info->attrs); in devlink_health_reporter_get_from_info()
361 struct devlink *devlink = devlink_nl_ctx(info)->devlink; in devlink_nl_health_reporter_get_doit() local
366 reporter = devlink_health_reporter_get_from_info(devlink, info); in devlink_nl_health_reporter_get_doit()
387 struct devlink *devlink, in devlink_nl_health_reporter_get_dump_one() argument
409 list_for_each_entry(reporter, &devlink->reporter_list, list) { in devlink_nl_health_reporter_get_dump_one()
426 xa_for_each_range(&devlink->ports, port_index, port, in devlink_nl_health_reporter_get_dump_one()
459 struct devlink *devlink = devlink_nl_ctx(info)->devlink; in devlink_nl_health_reporter_set_doit() local
462 reporter = devlink_health_reporter_get_from_info(devlink, info); in devlink_nl_health_reporter_set_doit()
510 struct devlink *devlink = reporter->devlink; in devlink_recover_notify() local
516 ASSERT_DEVLINK_REGISTERED(devlink); in devlink_recover_notify()
518 if (!devlink_nl_notify_need(devlink)) in devlink_recover_notify()
531 devlink_nl_obj_desc_init(&desc, devlink); in devlink_recover_notify()
534 devlink_nl_notify_send_desc(devlink, msg, &desc); in devlink_recover_notify()
659 struct devlink *devlink = reporter->devlink; in devlink_health_report() local
664 trace_devlink_health_report(devlink, reporter->ops->name, msg); in devlink_health_report()
671 trace_devlink_health_recover_aborted(devlink, in devlink_health_report()
680 devl_lock(devlink); in devlink_health_report()
683 devl_unlock(devlink); in devlink_health_report()
689 devl_lock(devlink); in devlink_health_report()
691 devl_unlock(devlink); in devlink_health_report()
709 trace_devlink_health_reporter_state_update(reporter->devlink, in devlink_health_reporter_state_update()
718 struct devlink *devlink = devlink_nl_ctx(info)->devlink; in devlink_nl_health_reporter_recover_doit() local
721 reporter = devlink_health_reporter_get_from_info(devlink, info); in devlink_nl_health_reporter_recover_doit()
1160 struct devlink *devlink = devlink_nl_ctx(info)->devlink; in devlink_nl_health_reporter_diagnose_doit() local
1165 reporter = devlink_health_reporter_get_from_info(devlink, info); in devlink_nl_health_reporter_diagnose_doit()
1198 struct devlink *devlink; in devlink_health_reporter_get_from_cb_lock() local
1200 devlink = devlink_get_from_attrs_lock(sock_net(cb->skb->sk), attrs, in devlink_health_reporter_get_from_cb_lock()
1202 if (IS_ERR(devlink)) in devlink_health_reporter_get_from_cb_lock()
1205 reporter = devlink_health_reporter_get_from_attrs(devlink, attrs); in devlink_health_reporter_get_from_cb_lock()
1207 devl_unlock(devlink); in devlink_health_reporter_get_from_cb_lock()
1208 devlink_put(devlink); in devlink_health_reporter_get_from_cb_lock()
1218 struct devlink *devlink; in devlink_nl_health_reporter_dump_get_dumpit() local
1225 devlink = reporter->devlink; in devlink_nl_health_reporter_dump_get_dumpit()
1227 devl_unlock(devlink); in devlink_nl_health_reporter_dump_get_dumpit()
1228 devlink_put(devlink); in devlink_nl_health_reporter_dump_get_dumpit()
1247 devl_unlock(devlink); in devlink_nl_health_reporter_dump_get_dumpit()
1248 devlink_put(devlink); in devlink_nl_health_reporter_dump_get_dumpit()
1255 struct devlink *devlink = devlink_nl_ctx(info)->devlink; in devlink_nl_health_reporter_dump_clear_doit() local
1258 reporter = devlink_health_reporter_get_from_info(devlink, info); in devlink_nl_health_reporter_dump_clear_doit()
1272 struct devlink *devlink = devlink_nl_ctx(info)->devlink; in devlink_nl_health_reporter_test_doit() local
1275 reporter = devlink_health_reporter_get_from_info(devlink, info); in devlink_nl_health_reporter_test_doit()
1287 * @fmsg: devlink formatted message pointer