• 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()
158 struct nsim_dev_health *health = devlink_health_reporter_priv(reporter); in nsim_dev_dummy_reporter_dump() local
168 return nsim_dev_dummy_fmsg_put(fmsg, health->binary_len); in nsim_dev_dummy_reporter_dump()
176 struct nsim_dev_health *health = devlink_health_reporter_priv(reporter); in nsim_dev_dummy_reporter_diagnose() local
179 if (health->recovered_break_msg) { in nsim_dev_dummy_reporter_diagnose()
182 health->recovered_break_msg); in nsim_dev_dummy_reporter_diagnose()
186 return nsim_dev_dummy_fmsg_put(fmsg, health->binary_len); in nsim_dev_dummy_reporter_diagnose()
201 struct nsim_dev_health *health = file->private_data; in nsim_dev_health_break_write() local
214 err = devlink_health_report(health->dummy_reporter, break_msg, &ctx); in nsim_dev_health_break_write()
232 struct nsim_dev_health *health = &nsim_dev->health; in nsim_dev_health_init() local
235 health->empty_reporter = in nsim_dev_health_init()
238 0, health); in nsim_dev_health_init()
239 if (IS_ERR(health->empty_reporter)) in nsim_dev_health_init()
240 return PTR_ERR(health->empty_reporter); in nsim_dev_health_init()
242 health->dummy_reporter = in nsim_dev_health_init()
245 0, health); in nsim_dev_health_init()
246 if (IS_ERR(health->dummy_reporter)) { in nsim_dev_health_init()
247 err = PTR_ERR(health->dummy_reporter); in nsim_dev_health_init()
251 health->ddir = debugfs_create_dir("health", nsim_dev->ddir); in nsim_dev_health_init()
252 if (IS_ERR(health->ddir)) { in nsim_dev_health_init()
253 err = PTR_ERR(health->ddir); in nsim_dev_health_init()
257 health->recovered_break_msg = NULL; in nsim_dev_health_init()
258 debugfs_create_file("break_health", 0200, health->ddir, health, in nsim_dev_health_init()
260 health->binary_len = 16; in nsim_dev_health_init()
261 debugfs_create_u32("binary_len", 0600, health->ddir, in nsim_dev_health_init()
262 &health->binary_len); in nsim_dev_health_init()
263 health->fail_recover = false; in nsim_dev_health_init()
264 debugfs_create_bool("fail_recover", 0600, health->ddir, in nsim_dev_health_init()
265 &health->fail_recover); in nsim_dev_health_init()
269 devl_health_reporter_destroy(health->dummy_reporter); in nsim_dev_health_init()
271 devl_health_reporter_destroy(health->empty_reporter); in nsim_dev_health_init()
277 struct nsim_dev_health *health = &nsim_dev->health; in nsim_dev_health_exit() local
279 debugfs_remove_recursive(health->ddir); in nsim_dev_health_exit()
280 kfree(health->recovered_break_msg); in nsim_dev_health_exit()
281 devl_health_reporter_destroy(health->dummy_reporter); in nsim_dev_health_exit()
282 devl_health_reporter_destroy(health->empty_reporter); in nsim_dev_health_exit()