Lines Matching refs:smfs_matcher
43 struct mlx5_ct_fs_smfs_matcher *smfs_matcher;
115 struct mlx5_ct_fs_smfs_matcher *m, *smfs_matcher;
123 smfs_matcher = &matchers->smfs_matchers[ipv4 * 3 + tcp * 2 + gre];
125 if (refcount_inc_not_zero(&smfs_matcher->ref))
126 return smfs_matcher;
133 if (refcount_inc_not_zero(&smfs_matcher->ref))
155 smfs_matcher = ERR_CAST(dr_matcher);
159 smfs_matcher->dr_matcher = dr_matcher;
160 smfs_matcher->prio = prio;
161 list_add(&smfs_matcher->list, prev);
162 refcount_set(&smfs_matcher->ref, 1);
166 return smfs_matcher;
170 mlx5_ct_fs_smfs_matcher_put(struct mlx5_ct_fs *fs, struct mlx5_ct_fs_smfs_matcher *smfs_matcher)
174 if (!refcount_dec_and_mutex_lock(&smfs_matcher->ref, &fs_smfs->lock))
177 mlx5_smfs_matcher_destroy(smfs_matcher->dr_matcher);
178 list_del(&smfs_matcher->list);
300 struct mlx5_ct_fs_smfs_matcher *smfs_matcher;
331 smfs_matcher = mlx5_ct_fs_smfs_matcher_get(fs, nat, ipv4, tcp, gre);
332 if (IS_ERR(smfs_matcher)) {
333 err = PTR_ERR(smfs_matcher);
337 rule = mlx5_smfs_rule_create(smfs_matcher->dr_matcher, spec, num_actions, actions,
345 smfs_rule->smfs_matcher = smfs_matcher;
350 mlx5_ct_fs_smfs_matcher_put(fs, smfs_matcher);
366 mlx5_ct_fs_smfs_matcher_put(fs, smfs_rule->smfs_matcher);