int
mlx5e_tc_post_act_offload(struct mlx5e_post_act *post_act, struct mlx5e_post_act_handle *handle)
{ struct mlx5_flow_spec *spec; int err;
if (IS_ERR(post_act)) return PTR_ERR(post_act);
spec = kvzalloc(sizeof(*spec), GFP_KERNEL); if (!spec) return -ENOMEM;
/* Post action rule matches on fte_id and executes original rule's tc rule action */
mlx5e_tc_match_to_reg_match(spec, FTEID_TO_REG, handle->id, MLX5_POST_ACTION_MASK);
handle->rule = mlx5e_tc_rule_offload(post_act->priv, spec, handle->attr); if (IS_ERR(handle->rule)) {
err = PTR_ERR(handle->rule);
netdev_warn(post_act->priv->netdev, "Failed to add post action rule"); goto err_rule;
}
handle->ns_type = post_act->ns_type; /* Splits were handled before post action */ if (handle->ns_type == MLX5_FLOW_NAMESPACE_FDB)
post_attr->esw_attr->split_count = 0;
/* Allocate a header modify action to write the post action handle fte id to a register. */ int
mlx5e_tc_post_act_set_handle(struct mlx5_core_dev *dev, struct mlx5e_post_act_handle *handle, struct mlx5e_tc_mod_hdr_acts *acts)
{ return mlx5e_tc_match_to_reg_set(dev, acts, handle->ns_type, FTEID_TO_REG, handle->id);
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.