Lines Matching refs:fs_rule

4364 static int mlx4_do_mirror_rule(struct mlx4_dev *dev, struct res_fs_rule *fs_rule);
4485 static int mlx4_undo_mirror_rule(struct mlx4_dev *dev, struct res_fs_rule *fs_rule) in mlx4_undo_mirror_rule() argument
4489 err = rem_res_range(dev, fs_rule->com.owner, fs_rule->com.res_id, 1, RES_FS_RULE, 0); in mlx4_undo_mirror_rule()
4495 mlx4_cmd(dev, fs_rule->com.res_id, 0, 0, MLX4_QP_FLOW_STEERING_DETACH, in mlx4_undo_mirror_rule()
4977 static int mlx4_do_mirror_rule(struct mlx4_dev *dev, struct res_fs_rule *fs_rule) in mlx4_do_mirror_rule() argument
4988 if (!fs_rule->mirr_mbox) { in mlx4_do_mirror_rule()
4993 memcpy(mailbox->buf, fs_rule->mirr_mbox, fs_rule->mirr_mbox_size); in mlx4_do_mirror_rule()
4994 err = mlx4_cmd_imm(dev, mailbox->dma, &reg_id, fs_rule->mirr_mbox_size >> 2, 0, in mlx4_do_mirror_rule()
5002 err = add_res_range(dev, fs_rule->com.owner, reg_id, 1, RES_FS_RULE, fs_rule->qpn); in mlx4_do_mirror_rule()
5006 err = get_res(dev, fs_rule->com.owner, reg_id, RES_FS_RULE, &mirr_rule); in mlx4_do_mirror_rule()
5010 fs_rule->mirr_rule_id = reg_id; in mlx4_do_mirror_rule()
5014 put_res(dev, fs_rule->com.owner, reg_id, RES_FS_RULE); in mlx4_do_mirror_rule()
5018 rem_res_range(dev, fs_rule->com.owner, reg_id, 1, RES_FS_RULE, 0); in mlx4_do_mirror_rule()
5033 struct res_fs_rule *fs_rule; in mlx4_mirror_fs_rules() local
5038 fs_rule = rb_entry(p, struct res_fs_rule, com.node); in mlx4_mirror_fs_rules()
5039 if ((bond && fs_rule->mirr_mbox_size) || in mlx4_mirror_fs_rules()
5040 (!bond && !fs_rule->mirr_mbox_size)) in mlx4_mirror_fs_rules()
5041 list_add_tail(&fs_rule->mirr_list, &mirr_list); in mlx4_mirror_fs_rules()
5044 list_for_each_entry(fs_rule, &mirr_list, mirr_list) { in mlx4_mirror_fs_rules()
5046 err += mlx4_do_mirror_rule(dev, fs_rule); in mlx4_mirror_fs_rules()
5048 err += mlx4_undo_mirror_rule(dev, fs_rule); in mlx4_mirror_fs_rules()
5070 struct res_fs_rule *fs_rule; in rem_slave_fs_rule() local
5082 list_for_each_entry_safe(fs_rule, tmp, fs_rule_list, com.list) { in rem_slave_fs_rule()
5084 if (fs_rule->com.owner == slave) { in rem_slave_fs_rule()
5085 base = fs_rule->com.res_id; in rem_slave_fs_rule()
5086 state = fs_rule->com.from_state; in rem_slave_fs_rule()
5097 rb_erase(&fs_rule->com.node, in rem_slave_fs_rule()
5099 list_del(&fs_rule->com.list); in rem_slave_fs_rule()
5101 kfree(fs_rule->mirr_mbox); in rem_slave_fs_rule()
5102 kfree(fs_rule); in rem_slave_fs_rule()