Lines Matching refs:delay_drop
2585 struct mlx5_ib_delay_drop *delay_drop = in delay_drop_handler() local
2589 atomic_inc(&delay_drop->events_cnt); in delay_drop_handler()
2591 mutex_lock(&delay_drop->lock); in delay_drop_handler()
2592 err = mlx5_core_set_delay_drop(delay_drop->dev, delay_drop->timeout); in delay_drop_handler()
2594 mlx5_ib_warn(delay_drop->dev, "Failed to set delay drop, timeout=%u\n", in delay_drop_handler()
2595 delay_drop->timeout); in delay_drop_handler()
2596 delay_drop->activate = false; in delay_drop_handler()
2598 mutex_unlock(&delay_drop->lock); in delay_drop_handler()
2610 schedule_work(&ibdev->delay_drop.delay_drop_work); in handle_general_event()
3131 struct mlx5_ib_delay_drop *delay_drop = filp->private_data; in delay_drop_timeout_read() local
3135 len = snprintf(lbuf, sizeof(lbuf), "%u\n", delay_drop->timeout); in delay_drop_timeout_read()
3142 struct mlx5_ib_delay_drop *delay_drop = filp->private_data; in delay_drop_timeout_write() local
3152 mlx5_ib_dbg(delay_drop->dev, "Round delay drop timeout to %u usec\n", in delay_drop_timeout_write()
3155 delay_drop->timeout = timeout; in delay_drop_timeout_write()
4088 mutex_init(&dev->delay_drop.lock); in mlx5_ib_stage_delay_drop_init()
4089 dev->delay_drop.dev = dev; in mlx5_ib_stage_delay_drop_init()
4090 dev->delay_drop.activate = false; in mlx5_ib_stage_delay_drop_init()
4091 dev->delay_drop.timeout = MLX5_MAX_DELAY_DROP_TIMEOUT_MS * 1000; in mlx5_ib_stage_delay_drop_init()
4092 INIT_WORK(&dev->delay_drop.delay_drop_work, delay_drop_handler); in mlx5_ib_stage_delay_drop_init()
4093 atomic_set(&dev->delay_drop.rqs_cnt, 0); in mlx5_ib_stage_delay_drop_init()
4094 atomic_set(&dev->delay_drop.events_cnt, 0); in mlx5_ib_stage_delay_drop_init()
4100 dev->delay_drop.dir_debugfs = root; in mlx5_ib_stage_delay_drop_init()
4103 &dev->delay_drop.events_cnt); in mlx5_ib_stage_delay_drop_init()
4105 &dev->delay_drop.rqs_cnt); in mlx5_ib_stage_delay_drop_init()
4106 debugfs_create_file("timeout", 0600, root, &dev->delay_drop, in mlx5_ib_stage_delay_drop_init()
4116 cancel_work_sync(&dev->delay_drop.delay_drop_work); in mlx5_ib_stage_delay_drop_cleanup()
4117 if (!dev->delay_drop.dir_debugfs) in mlx5_ib_stage_delay_drop_cleanup()
4120 debugfs_remove_recursive(dev->delay_drop.dir_debugfs); in mlx5_ib_stage_delay_drop_cleanup()
4121 dev->delay_drop.dir_debugfs = NULL; in mlx5_ib_stage_delay_drop_cleanup()