Lines Matching refs:handle
81 struct mlx5e_post_act_handle *handle)
94 mlx5e_tc_match_to_reg_match(spec, FTEID_TO_REG, handle->id, MLX5_POST_ACTION_MASK);
96 handle->rule = mlx5e_tc_rule_offload(post_act->priv, spec, handle->attr);
97 if (IS_ERR(handle->rule)) {
98 err = PTR_ERR(handle->rule);
114 struct mlx5e_post_act_handle *handle;
120 handle = kzalloc(sizeof(*handle), GFP_KERNEL);
121 if (!handle)
132 handle->ns_type = post_act->ns_type;
134 if (handle->ns_type == MLX5_FLOW_NAMESPACE_FDB)
137 err = xa_alloc(&post_act->ids, &handle->id, post_attr,
142 handle->attr = post_attr;
144 return handle;
147 kfree(handle);
153 struct mlx5e_post_act_handle *handle)
155 mlx5e_tc_rule_unoffload(post_act->priv, handle->rule, handle->attr);
156 handle->rule = NULL;
160 mlx5e_tc_post_act_del(struct mlx5e_post_act *post_act, struct mlx5e_post_act_handle *handle)
162 if (!IS_ERR_OR_NULL(handle->rule))
163 mlx5e_tc_post_act_unoffload(post_act, handle);
164 xa_erase(&post_act->ids, handle->id);
165 kfree(handle);
174 /* Allocate a header modify action to write the post action handle fte id to a register. */
177 struct mlx5e_post_act_handle *handle,
180 return mlx5e_tc_match_to_reg_set(dev, acts, handle->ns_type, FTEID_TO_REG, handle->id);