• Home
  • Raw
  • Download

Lines Matching refs:health

43 	struct nsim_dev_health *health = devlink_health_reporter_priv(reporter);  in nsim_dev_dummy_reporter_recover()  local
46 if (health->fail_recover) { in nsim_dev_dummy_reporter_recover()
54 kfree(health->recovered_break_msg); in nsim_dev_dummy_reporter_recover()
55 health->recovered_break_msg = kstrdup(ctx->break_msg, in nsim_dev_dummy_reporter_recover()
57 if (!health->recovered_break_msg) in nsim_dev_dummy_reporter_recover()
190 struct nsim_dev_health *health = devlink_health_reporter_priv(reporter); in nsim_dev_dummy_reporter_dump() local
200 return nsim_dev_dummy_fmsg_put(fmsg, health->binary_len); in nsim_dev_dummy_reporter_dump()
208 struct nsim_dev_health *health = devlink_health_reporter_priv(reporter); in nsim_dev_dummy_reporter_diagnose() local
211 if (health->recovered_break_msg) { in nsim_dev_dummy_reporter_diagnose()
214 health->recovered_break_msg); in nsim_dev_dummy_reporter_diagnose()
218 return nsim_dev_dummy_fmsg_put(fmsg, health->binary_len); in nsim_dev_dummy_reporter_diagnose()
233 struct nsim_dev_health *health = file->private_data; in nsim_dev_health_break_write() local
251 err = devlink_health_report(health->dummy_reporter, break_msg, &ctx); in nsim_dev_health_break_write()
269 struct nsim_dev_health *health = &nsim_dev->health; in nsim_dev_health_init() local
272 health->empty_reporter = in nsim_dev_health_init()
275 0, health); in nsim_dev_health_init()
276 if (IS_ERR(health->empty_reporter)) in nsim_dev_health_init()
277 return PTR_ERR(health->empty_reporter); in nsim_dev_health_init()
279 health->dummy_reporter = in nsim_dev_health_init()
282 0, health); in nsim_dev_health_init()
283 if (IS_ERR(health->dummy_reporter)) { in nsim_dev_health_init()
284 err = PTR_ERR(health->dummy_reporter); in nsim_dev_health_init()
288 health->ddir = debugfs_create_dir("health", nsim_dev->ddir); in nsim_dev_health_init()
289 if (IS_ERR(health->ddir)) { in nsim_dev_health_init()
290 err = PTR_ERR(health->ddir); in nsim_dev_health_init()
294 health->recovered_break_msg = NULL; in nsim_dev_health_init()
295 debugfs_create_file("break_health", 0200, health->ddir, health, in nsim_dev_health_init()
297 health->binary_len = 16; in nsim_dev_health_init()
298 debugfs_create_u32("binary_len", 0600, health->ddir, in nsim_dev_health_init()
299 &health->binary_len); in nsim_dev_health_init()
300 health->fail_recover = false; in nsim_dev_health_init()
301 debugfs_create_bool("fail_recover", 0600, health->ddir, in nsim_dev_health_init()
302 &health->fail_recover); in nsim_dev_health_init()
306 devlink_health_reporter_destroy(health->dummy_reporter); in nsim_dev_health_init()
308 devlink_health_reporter_destroy(health->empty_reporter); in nsim_dev_health_init()
314 struct nsim_dev_health *health = &nsim_dev->health; in nsim_dev_health_exit() local
316 debugfs_remove_recursive(health->ddir); in nsim_dev_health_exit()
317 kfree(health->recovered_break_msg); in nsim_dev_health_exit()
318 devlink_health_reporter_destroy(health->dummy_reporter); in nsim_dev_health_exit()
319 devlink_health_reporter_destroy(health->empty_reporter); in nsim_dev_health_exit()