* [PATCH 2/5] net/mlx5/hws: introduce jump to matcher action
2024-10-15 16:35 [PATCH 1/5] net/mlx5/hws: introduce new matcher type Alexander Kozyrev
@ 2024-10-15 16:35 ` Alexander Kozyrev
2024-10-15 16:35 ` [PATCH 3/5] net/mlx5: create array ste matcher Alexander Kozyrev
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Alexander Kozyrev @ 2024-10-15 16:35 UTC (permalink / raw)
To: dev
Cc: rasland, viacheslavo, matan, hamdani, valex, dsosnowski, orika,
bingz, suanmingm
From: Hamdan Igbaria <hamdani@nvidia.com>
Introduce jump to matcher action, this action will allow
jumping to another matcher.
For now this jump restricted to STE array matchers and
matchers of size 1.
Signed-off-by: Hamdan Igbaria <hamdani@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr.h | 29 ++++++++++
drivers/net/mlx5/hws/mlx5dr_action.c | 87 +++++++++++++++++++++++++++-
drivers/net/mlx5/hws/mlx5dr_action.h | 3 +
drivers/net/mlx5/hws/mlx5dr_debug.c | 1 +
4 files changed, 117 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr.h b/drivers/net/mlx5/hws/mlx5dr.h
index 8a1a389a3f..1b58eeb2c7 100644
--- a/drivers/net/mlx5/hws/mlx5dr.h
+++ b/drivers/net/mlx5/hws/mlx5dr.h
@@ -52,6 +52,7 @@ enum mlx5dr_action_type {
MLX5DR_ACTION_TYP_POP_IPV6_ROUTE_EXT,
MLX5DR_ACTION_TYP_PUSH_IPV6_ROUTE_EXT,
MLX5DR_ACTION_TYP_NAT64,
+ MLX5DR_ACTION_TYP_JUMP_TO_MATCHER,
MLX5DR_ACTION_TYP_MAX,
};
@@ -287,6 +288,10 @@ struct mlx5dr_rule_action {
uint32_t offset;
enum mlx5dr_action_aso_ct_flags direction;
} aso_ct;
+
+ struct {
+ uint32_t offset;
+ } jump_to_matcher;
};
};
@@ -304,6 +309,15 @@ struct mlx5dr_action_dest_attr {
} reformat;
};
+enum mlx5dr_action_jump_to_matcher_type {
+ MLX5DR_ACTION_JUMP_TO_MATCHER_BY_INDEX,
+};
+
+struct mlx5dr_action_jump_to_matcher_attr {
+ enum mlx5dr_action_jump_to_matcher_type type;
+ struct mlx5dr_matcher *matcher;
+};
+
union mlx5dr_crc_encap_entropy_hash_ip_field {
uint8_t ipv6_addr[16];
struct {
@@ -938,6 +952,21 @@ mlx5dr_action_create_nat64(struct mlx5dr_context *ctx,
struct mlx5dr_action_nat64_attr *attr,
uint32_t flags);
+/* Create direct rule jump to matcher action.
+ *
+ * @param[in] ctx
+ * The context in which the new action will be created.
+ * @param[in] attr
+ * The relevant attribute of the action.
+ * @param[in] flags
+ * Action creation flags. (enum mlx5dr_action_flags)
+ * @return pointer to mlx5dr_action on success NULL otherwise.
+ */
+struct mlx5dr_action *
+mlx5dr_action_create_jump_to_matcher(struct mlx5dr_context *ctx,
+ struct mlx5dr_action_jump_to_matcher_attr *attr,
+ uint32_t flags);
+
/* Destroy direct rule action.
*
* @param[in] action
diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index 3fceb96de2..3412a96894 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -42,7 +42,8 @@ static const uint32_t action_order_arr[MLX5DR_TABLE_TYPE_MAX][MLX5DR_ACTION_TYP_
BIT(MLX5DR_ACTION_TYP_TIR) |
BIT(MLX5DR_ACTION_TYP_DROP) |
BIT(MLX5DR_ACTION_TYP_DEST_ROOT) |
- BIT(MLX5DR_ACTION_TYP_DEST_ARRAY),
+ BIT(MLX5DR_ACTION_TYP_DEST_ARRAY) |
+ BIT(MLX5DR_ACTION_TYP_JUMP_TO_MATCHER),
BIT(MLX5DR_ACTION_TYP_LAST),
},
[MLX5DR_TABLE_TYPE_NIC_TX] = {
@@ -62,7 +63,8 @@ static const uint32_t action_order_arr[MLX5DR_TABLE_TYPE_MAX][MLX5DR_ACTION_TYP_
BIT(MLX5DR_ACTION_TYP_TBL) |
BIT(MLX5DR_ACTION_TYP_MISS) |
BIT(MLX5DR_ACTION_TYP_DROP) |
- BIT(MLX5DR_ACTION_TYP_DEST_ROOT),
+ BIT(MLX5DR_ACTION_TYP_DEST_ROOT) |
+ BIT(MLX5DR_ACTION_TYP_JUMP_TO_MATCHER),
BIT(MLX5DR_ACTION_TYP_LAST),
},
[MLX5DR_TABLE_TYPE_FDB] = {
@@ -88,7 +90,8 @@ static const uint32_t action_order_arr[MLX5DR_TABLE_TYPE_MAX][MLX5DR_ACTION_TYP_
BIT(MLX5DR_ACTION_TYP_VPORT) |
BIT(MLX5DR_ACTION_TYP_DROP) |
BIT(MLX5DR_ACTION_TYP_DEST_ROOT) |
- BIT(MLX5DR_ACTION_TYP_DEST_ARRAY),
+ BIT(MLX5DR_ACTION_TYP_DEST_ARRAY) |
+ BIT(MLX5DR_ACTION_TYP_JUMP_TO_MATCHER),
BIT(MLX5DR_ACTION_TYP_LAST),
},
};
@@ -1091,6 +1094,13 @@ static void mlx5dr_action_fill_stc_attr(struct mlx5dr_action *action,
attr->action_offset = MLX5DR_ACTION_OFFSET_DW5;
attr->reparse_mode = MLX5_IFC_STC_REPARSE_ALWAYS;
break;
+ case MLX5DR_ACTION_TYP_JUMP_TO_MATCHER:
+ attr->action_type = MLX5_IFC_STC_ACTION_TYPE_JUMP_TO_STE_TABLE;
+ attr->action_offset = MLX5DR_ACTION_OFFSET_HIT;
+ attr->ste_table.ste = action->jump_to_matcher.matcher->match_ste.ste;
+ attr->ste_table.ste_pool = action->jump_to_matcher.matcher->match_ste.pool;
+ attr->ste_table.match_definer_id = action->ctx->caps->trivial_match_definer;
+ break;
default:
DR_LOG(ERR, "Invalid action type %d", action->type);
assert(false);
@@ -3078,6 +3088,57 @@ mlx5dr_action_create_nat64(struct mlx5dr_context *ctx,
return NULL;
}
+struct mlx5dr_action *
+mlx5dr_action_create_jump_to_matcher(struct mlx5dr_context *ctx,
+ struct mlx5dr_action_jump_to_matcher_attr *attr,
+ uint32_t flags)
+{
+ struct mlx5dr_matcher *matcher = attr->matcher;
+ struct mlx5dr_matcher_attr *m_attr;
+ struct mlx5dr_action *action;
+
+ if (attr->type != MLX5DR_ACTION_JUMP_TO_MATCHER_BY_INDEX) {
+ DR_LOG(ERR, "Only jump to matcher by index is supported");
+ goto enotsup;
+ }
+
+ if (mlx5dr_action_is_root_flags(flags)) {
+ DR_LOG(ERR, "Action flags must be only non root (HWS)");
+ goto enotsup;
+ }
+
+ if (mlx5dr_table_is_root(matcher->tbl)) {
+ DR_LOG(ERR, "Root matcher cannot be set as destination");
+ goto enotsup;
+ }
+
+ m_attr = &matcher->attr;
+
+ if (!(matcher->flags & MLX5DR_MATCHER_FLAGS_STE_ARRAY) &&
+ (m_attr->resizable || m_attr->table.sz_col_log || m_attr->table.sz_row_log)) {
+ DR_LOG(ERR, "Only STE array or matcher of size 1 can be set as destination");
+ goto enotsup;
+ }
+
+ action = mlx5dr_action_create_generic(ctx, flags, MLX5DR_ACTION_TYP_JUMP_TO_MATCHER);
+ if (!action)
+ return NULL;
+
+ action->jump_to_matcher.matcher = matcher;
+
+ if (mlx5dr_action_create_stcs(action, NULL)) {
+ DR_LOG(ERR, "Failed to create action jump to matcher STC");
+ simple_free(action);
+ return NULL;
+ }
+
+ return action;
+
+enotsup:
+ rte_errno = ENOTSUP;
+ return NULL;
+}
+
static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
{
struct mlx5dr_devx_obj *obj = NULL;
@@ -3100,6 +3161,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
case MLX5DR_ACTION_TYP_PUSH_VLAN:
case MLX5DR_ACTION_TYP_REMOVE_HEADER:
case MLX5DR_ACTION_TYP_VPORT:
+ case MLX5DR_ACTION_TYP_JUMP_TO_MATCHER:
mlx5dr_action_destroy_stcs(action);
break;
case MLX5DR_ACTION_TYP_DEST_ROOT:
@@ -3618,6 +3680,19 @@ mlx5dr_action_setter_default_hit(struct mlx5dr_actions_apply_data *apply,
htobe32(apply->common_res->default_stc->default_hit.offset);
}
+static void
+mlx5dr_action_setter_hit_matcher(struct mlx5dr_actions_apply_data *apply,
+ struct mlx5dr_actions_wqe_setter *setter)
+{
+ struct mlx5dr_rule_action *rule_action;
+
+ rule_action = &apply->rule_action[setter->idx_hit];
+
+ apply->wqe_data[MLX5DR_ACTION_OFFSET_HIT_LSB] =
+ htobe32(rule_action->jump_to_matcher.offset << 6);
+ mlx5dr_action_apply_stc(apply, MLX5DR_ACTION_STC_IDX_HIT, setter->idx_hit);
+}
+
static void
mlx5dr_action_setter_hit_next_action(struct mlx5dr_actions_apply_data *apply,
__rte_unused struct mlx5dr_actions_wqe_setter *setter)
@@ -3965,6 +4040,12 @@ int mlx5dr_action_template_process(struct mlx5dr_action_template *at)
}
break;
+ case MLX5DR_ACTION_TYP_JUMP_TO_MATCHER:
+ last_setter->flags |= ASF_HIT;
+ last_setter->set_hit = &mlx5dr_action_setter_hit_matcher;
+ last_setter->idx_hit = i;
+ break;
+
default:
DR_LOG(ERR, "Unsupported action type: %d", action_type[i]);
rte_errno = ENOTSUP;
diff --git a/drivers/net/mlx5/hws/mlx5dr_action.h b/drivers/net/mlx5/hws/mlx5dr_action.h
index ba4ce55228..8ce4ecd5ba 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.h
+++ b/drivers/net/mlx5/hws/mlx5dr_action.h
@@ -223,6 +223,9 @@ struct mlx5dr_action {
struct {
struct mlx5dr_action *stages[MLX5DR_ACTION_NAT64_STAGES];
} nat64;
+ struct {
+ struct mlx5dr_matcher *matcher;
+ } jump_to_matcher;
};
};
diff --git a/drivers/net/mlx5/hws/mlx5dr_debug.c b/drivers/net/mlx5/hws/mlx5dr_debug.c
index f15ad96598..8684a8197a 100644
--- a/drivers/net/mlx5/hws/mlx5dr_debug.c
+++ b/drivers/net/mlx5/hws/mlx5dr_debug.c
@@ -29,6 +29,7 @@ const char *mlx5dr_debug_action_type_str[] = {
[MLX5DR_ACTION_TYP_POP_IPV6_ROUTE_EXT] = "POP_IPV6_ROUTE_EXT",
[MLX5DR_ACTION_TYP_PUSH_IPV6_ROUTE_EXT] = "PUSH_IPV6_ROUTE_EXT",
[MLX5DR_ACTION_TYP_NAT64] = "NAT64",
+ [MLX5DR_ACTION_TYP_JUMP_TO_MATCHER] = "JUMP_TO_MATCHER",
};
static_assert(ARRAY_SIZE(mlx5dr_debug_action_type_str) == MLX5DR_ACTION_TYP_MAX,
--
2.18.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/5] net/mlx5: add flow rule insertion by index with pattern
2024-10-15 16:35 [PATCH 1/5] net/mlx5/hws: introduce new matcher type Alexander Kozyrev
2024-10-15 16:35 ` [PATCH 2/5] net/mlx5/hws: introduce jump to matcher action Alexander Kozyrev
2024-10-15 16:35 ` [PATCH 3/5] net/mlx5: create array ste matcher Alexander Kozyrev
@ 2024-10-15 16:35 ` Alexander Kozyrev
2024-10-15 16:35 ` [PATCH 5/5] net/mlx5: implement jump to table index action Alexander Kozyrev
3 siblings, 0 replies; 5+ messages in thread
From: Alexander Kozyrev @ 2024-10-15 16:35 UTC (permalink / raw)
To: dev
Cc: rasland, viacheslavo, matan, hamdani, valex, dsosnowski, orika,
bingz, suanmingm
Implement rte_flow_async_create_by_index_with_pattern() function.
Rework the driver implementaion to reduce the code duplication by
providing a signle flow insertion routine, that can be called with
different parameters depending on the insertion type.
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 281 +++++++++-----------------------
1 file changed, 81 insertions(+), 200 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 6434937562..6c8404ee2c 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -335,18 +335,13 @@ static __rte_always_inline uint32_t flow_hw_tx_tag_regc_value(struct rte_eth_dev
static int flow_hw_async_create_validate(struct rte_eth_dev *dev,
const uint32_t queue,
const struct rte_flow_template_table *table,
+ enum rte_flow_table_insertion_type insertion_type,
+ const uint32_t rule_index,
const struct rte_flow_item items[],
const uint8_t pattern_template_index,
const struct rte_flow_action actions[],
const uint8_t action_template_index,
struct rte_flow_error *error);
-static int flow_hw_async_create_by_index_validate(struct rte_eth_dev *dev,
- const uint32_t queue,
- const struct rte_flow_template_table *table,
- const uint32_t rule_index,
- const struct rte_flow_action actions[],
- const uint8_t action_template_index,
- struct rte_flow_error *error);
static int flow_hw_async_update_validate(struct rte_eth_dev *dev,
const uint32_t queue,
const struct rte_flow_hw *flow,
@@ -3884,6 +3879,12 @@ flow_hw_get_rule_items(struct rte_eth_dev *dev,
* The queue to create the flow.
* @param[in] attr
* Pointer to the flow operation attributes.
+ * @param[in] table
+ * Pointer to the template table.
+ * @param[in] insertion_type
+ * Insertion type for flow rules.
+ * @param[in] rule_index
+ * The item pattern flow follows from the table.
* @param[in] items
* Items with flow spec value.
* @param[in] pattern_template_index
@@ -3900,17 +3901,19 @@ flow_hw_get_rule_items(struct rte_eth_dev *dev,
* @return
* Flow pointer on success, NULL otherwise and rte_errno is set.
*/
-static struct rte_flow *
-flow_hw_async_flow_create(struct rte_eth_dev *dev,
- uint32_t queue,
- const struct rte_flow_op_attr *attr,
- struct rte_flow_template_table *table,
- const struct rte_flow_item items[],
- uint8_t pattern_template_index,
- const struct rte_flow_action actions[],
- uint8_t action_template_index,
- void *user_data,
- struct rte_flow_error *error)
+static __rte_always_inline struct rte_flow *
+flow_hw_async_flow_create_generic(struct rte_eth_dev *dev,
+ uint32_t queue,
+ const struct rte_flow_op_attr *attr,
+ struct rte_flow_template_table *table,
+ enum rte_flow_table_insertion_type insertion_type,
+ uint32_t rule_index,
+ const struct rte_flow_item items[],
+ uint8_t pattern_template_index,
+ const struct rte_flow_action actions[],
+ uint8_t action_template_index,
+ void *user_data,
+ struct rte_flow_error *error)
{
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5dr_rule_attr rule_attr = {
@@ -3928,8 +3931,8 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev,
int ret;
if (mlx5_fp_debug_enabled()) {
- if (flow_hw_async_create_validate(dev, queue, table, items, pattern_template_index,
- actions, action_template_index, error))
+ if (flow_hw_async_create_validate(dev, queue, table, insertion_type, rule_index,
+ items, pattern_template_index, actions, action_template_index, error))
return NULL;
}
flow = mlx5_ipool_malloc(table->flow, &flow_idx);
@@ -3967,7 +3970,7 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev,
* Indexed pool returns 1-based indices, but mlx5dr expects 0-based indices
* for rule insertion hints.
*/
- flow->rule_idx = flow->res_idx - 1;
+ flow->rule_idx = (rule_index == UINT32_MAX) ? flow->res_idx - 1 : rule_index;
rule_attr.rule_idx = flow->rule_idx;
/*
* Construct the flow actions based on the input actions.
@@ -4023,33 +4026,26 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev,
return NULL;
}
-/**
- * Enqueue HW steering flow creation by index.
- *
- * The flow will be applied to the HW only if the postpone bit is not set or
- * the extra push function is called.
- * The flow creation status should be checked from dequeue result.
- *
- * @param[in] dev
- * Pointer to the rte_eth_dev structure.
- * @param[in] queue
- * The queue to create the flow.
- * @param[in] attr
- * Pointer to the flow operation attributes.
- * @param[in] rule_index
- * The item pattern flow follows from the table.
- * @param[in] actions
- * Action with flow spec value.
- * @param[in] action_template_index
- * The action pattern flow follows from the table.
- * @param[in] user_data
- * Pointer to the user_data.
- * @param[out] error
- * Pointer to error structure.
- *
- * @return
- * Flow pointer on success, NULL otherwise and rte_errno is set.
- */
+static struct rte_flow *
+flow_hw_async_flow_create(struct rte_eth_dev *dev,
+ uint32_t queue,
+ const struct rte_flow_op_attr *attr,
+ struct rte_flow_template_table *table,
+ const struct rte_flow_item items[],
+ uint8_t pattern_template_index,
+ const struct rte_flow_action actions[],
+ uint8_t action_template_index,
+ void *user_data,
+ struct rte_flow_error *error)
+{
+ uint32_t rule_index = UINT32_MAX;
+
+ return flow_hw_async_flow_create_generic(dev, queue, attr, table,
+ RTE_FLOW_TABLE_INSERTION_TYPE_PATTERN, rule_index,
+ items, pattern_template_index, actions, action_template_index,
+ user_data, error);
+}
+
static struct rte_flow *
flow_hw_async_flow_create_by_index(struct rte_eth_dev *dev,
uint32_t queue,
@@ -4062,105 +4058,31 @@ flow_hw_async_flow_create_by_index(struct rte_eth_dev *dev,
struct rte_flow_error *error)
{
struct rte_flow_item items[] = {{.type = RTE_FLOW_ITEM_TYPE_END,}};
- struct mlx5_priv *priv = dev->data->dev_private;
- struct mlx5dr_rule_attr rule_attr = {
- .queue_id = queue,
- .user_data = user_data,
- .burst = attr->postpone,
- };
- struct mlx5dr_rule_action *rule_acts;
- struct mlx5_flow_hw_action_params ap;
- struct rte_flow_hw *flow = NULL;
- uint32_t flow_idx = 0;
- uint32_t res_idx = 0;
- int ret;
+ uint8_t pattern_template_index = 0;
- if (mlx5_fp_debug_enabled()) {
- if (flow_hw_async_create_by_index_validate(dev, queue, table, rule_index,
- actions, action_template_index, error))
- return NULL;
- }
- flow = mlx5_ipool_malloc(table->flow, &flow_idx);
- if (!flow) {
- rte_errno = ENOMEM;
- goto error;
- }
- rule_acts = flow_hw_get_dr_action_buffer(priv, table, action_template_index, queue);
- /*
- * Set the table here in order to know the destination table
- * when free the flow afterwards.
- */
- flow->table = table;
- flow->mt_idx = 0;
- flow->idx = flow_idx;
- if (table->resource) {
- mlx5_ipool_malloc(table->resource, &res_idx);
- if (!res_idx) {
- rte_errno = ENOMEM;
- goto error;
- }
- flow->res_idx = res_idx;
- } else {
- flow->res_idx = flow_idx;
- }
- flow->flags = 0;
- /*
- * Set the flow operation type here in order to know if the flow memory
- * should be freed or not when get the result from dequeue.
- */
- flow->operation_type = MLX5_FLOW_HW_FLOW_OP_TYPE_CREATE;
- flow->user_data = user_data;
- rule_attr.user_data = flow;
- /* Set the rule index. */
- flow->rule_idx = rule_index;
- rule_attr.rule_idx = flow->rule_idx;
- /*
- * Construct the flow actions based on the input actions.
- * The implicitly appended action is always fixed, like metadata
- * copy action from FDB to NIC Rx.
- * No need to copy and contrust a new "actions" list based on the
- * user's input, in order to save the cost.
- */
- if (flow_hw_actions_construct(dev, flow, &ap,
- &table->ats[action_template_index],
- table->its[0]->item_flags, table,
- actions, rule_acts, queue, error)) {
- rte_errno = EINVAL;
- goto error;
- }
- if (likely(!rte_flow_template_table_resizable(dev->data->port_id, &table->cfg.attr))) {
- ret = mlx5dr_rule_create(table->matcher_info[0].matcher,
- 0, items, action_template_index,
- rule_acts, &rule_attr,
- (struct mlx5dr_rule *)flow->rule);
- } else {
- struct rte_flow_hw_aux *aux = mlx5_flow_hw_aux(dev->data->port_id, flow);
- uint32_t selector;
+ return flow_hw_async_flow_create_generic(dev, queue, attr, table,
+ RTE_FLOW_TABLE_INSERTION_TYPE_INDEX, rule_index,
+ items, pattern_template_index, actions, action_template_index,
+ user_data, error);
+}
- flow->operation_type = MLX5_FLOW_HW_FLOW_OP_TYPE_RSZ_TBL_CREATE;
- rte_rwlock_read_lock(&table->matcher_replace_rwlk);
- selector = table->matcher_selector;
- ret = mlx5dr_rule_create(table->matcher_info[selector].matcher,
- 0, items, action_template_index,
- rule_acts, &rule_attr,
- (struct mlx5dr_rule *)flow->rule);
- rte_rwlock_read_unlock(&table->matcher_replace_rwlk);
- aux->matcher_selector = selector;
- flow->flags |= MLX5_FLOW_HW_FLOW_FLAG_MATCHER_SELECTOR;
- }
- if (likely(!ret)) {
- flow_hw_q_inc_flow_ops(priv, queue);
- return (struct rte_flow *)flow;
- }
-error:
- if (table->resource && res_idx)
- mlx5_ipool_free(table->resource, res_idx);
- if (flow_idx)
- mlx5_ipool_free(table->flow, flow_idx);
- rte_flow_error_set(error, rte_errno,
- RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
- "fail to create rte flow");
- return NULL;
+static struct rte_flow *
+flow_hw_async_flow_create_by_index_with_pattern(struct rte_eth_dev *dev,
+ uint32_t queue,
+ const struct rte_flow_op_attr *attr,
+ struct rte_flow_template_table *table,
+ uint32_t rule_index,
+ const struct rte_flow_item items[],
+ uint8_t pattern_template_index,
+ const struct rte_flow_action actions[],
+ uint8_t action_template_index,
+ void *user_data,
+ struct rte_flow_error *error)
+{
+ return flow_hw_async_flow_create_generic(dev, queue, attr, table,
+ RTE_FLOW_TABLE_INSERTION_TYPE_INDEX_WITH_PATTERN, rule_index,
+ items, pattern_template_index, actions, action_template_index,
+ user_data, error);
}
/**
@@ -16579,6 +16501,8 @@ flow_hw_async_op_validate(struct rte_eth_dev *dev,
* The queue to create the flow.
* @param[in] table
* Pointer to template table.
+ * @param[in] rule_index
+ * The item pattern flow follows from the table.
* @param[in] items
* Items with flow spec value.
* @param[in] pattern_template_index
@@ -16598,6 +16522,8 @@ static int
flow_hw_async_create_validate(struct rte_eth_dev *dev,
const uint32_t queue,
const struct rte_flow_template_table *table,
+ enum rte_flow_table_insertion_type insertion_type,
+ uint32_t rule_index,
const struct rte_flow_item items[],
const uint8_t pattern_template_index,
const struct rte_flow_action actions[],
@@ -16607,63 +16533,18 @@ flow_hw_async_create_validate(struct rte_eth_dev *dev,
if (flow_hw_async_op_validate(dev, queue, table, error))
return -rte_errno;
- if (table->cfg.attr.insertion_type != RTE_FLOW_TABLE_INSERTION_TYPE_PATTERN)
- return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
- "Only pattern insertion is allowed on this table");
-
- if (flow_hw_validate_rule_pattern(dev, table, pattern_template_index, items, error))
- return -rte_errno;
-
- if (flow_hw_validate_rule_actions(dev, table, action_template_index, actions, error))
- return -rte_errno;
-
- return 0;
-}
+ if (insertion_type != table->cfg.attr.insertion_type)
+ return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Flow rule insertion type mismatch with table configuration");
-/**
- * Validate user input for rte_flow_async_create_by_index() implementation.
- *
- * If RTE_LIBRTE_MLX5_DEBUG macro is not defined, this function is a no-op.
- *
- * @param[in] dev
- * Pointer to the rte_eth_dev structure.
- * @param[in] queue
- * The queue to create the flow.
- * @param[in] table
- * Pointer to template table.
- * @param[in] rule_index
- * Rule index in the table.
- * Inserting a rule to already occupied index results in undefined behavior.
- * @param[in] actions
- * Action with flow spec value.
- * @param[in] action_template_index
- * The action pattern flow follows from the table.
- * @param[out] error
- * Pointer to error structure.
- *
- * @return
- * 0 if user input is valid.
- * Negative errno otherwise, rte_errno and error struct is set.
- */
-static int
-flow_hw_async_create_by_index_validate(struct rte_eth_dev *dev,
- const uint32_t queue,
- const struct rte_flow_template_table *table,
- const uint32_t rule_index,
- const struct rte_flow_action actions[],
- const uint8_t action_template_index,
- struct rte_flow_error *error)
-{
- if (flow_hw_async_op_validate(dev, queue, table, error))
- return -rte_errno;
+ if (table->cfg.attr.insertion_type != RTE_FLOW_TABLE_INSERTION_TYPE_PATTERN)
+ if (rule_index >= table->cfg.attr.nb_flows)
+ return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Flow rule index exceeds table size");
if (table->cfg.attr.insertion_type != RTE_FLOW_TABLE_INSERTION_TYPE_INDEX)
- return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
- "Only index insertion is allowed on this table");
-
- if (rule_index >= table->cfg.attr.nb_flows)
- return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
- "Flow rule index exceeds table size");
+ if (flow_hw_validate_rule_pattern(dev, table, pattern_template_index, items, error))
+ return -rte_errno;
if (flow_hw_validate_rule_actions(dev, table, action_template_index, actions, error))
return -rte_errno;
@@ -16671,7 +16552,6 @@ flow_hw_async_create_by_index_validate(struct rte_eth_dev *dev,
return 0;
}
-
/**
* Validate user input for rte_flow_async_update() implementation.
*
@@ -16744,6 +16624,7 @@ flow_hw_async_destroy_validate(struct rte_eth_dev *dev,
static struct rte_flow_fp_ops mlx5_flow_hw_fp_ops = {
.async_create = flow_hw_async_flow_create,
.async_create_by_index = flow_hw_async_flow_create_by_index,
+ .async_create_by_index_with_pattern = flow_hw_async_flow_create_by_index_with_pattern,
.async_actions_update = flow_hw_async_flow_update,
.async_destroy = flow_hw_async_flow_destroy,
.push = flow_hw_push,
--
2.18.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 5/5] net/mlx5: implement jump to table index action
2024-10-15 16:35 [PATCH 1/5] net/mlx5/hws: introduce new matcher type Alexander Kozyrev
` (2 preceding siblings ...)
2024-10-15 16:35 ` [PATCH 4/5] net/mlx5: add flow rule insertion by index with pattern Alexander Kozyrev
@ 2024-10-15 16:35 ` Alexander Kozyrev
3 siblings, 0 replies; 5+ messages in thread
From: Alexander Kozyrev @ 2024-10-15 16:35 UTC (permalink / raw)
To: dev
Cc: rasland, viacheslavo, matan, hamdani, valex, dsosnowski, orika,
bingz, suanmingm
Implement RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action.
Create the hardware steering jump to matcher action,
assosiated with the template matcher. Use this action and
provided rule index as an offset in the matcher.
Note that it is only supported by the isolated matcher,
i.e. the table insertion type is by index with pattern.
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.h | 8 +-
drivers/net/mlx5/mlx5_flow_hw.c | 145 ++++++++++++++++++++++++++++++++
2 files changed, 151 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 86a1476879..3708e4d5bf 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -398,6 +398,7 @@ enum mlx5_feature_name {
#define MLX5_FLOW_ACTION_IPV6_ROUTING_REMOVE (1ull << 48)
#define MLX5_FLOW_ACTION_IPV6_ROUTING_PUSH (1ull << 49)
#define MLX5_FLOW_ACTION_NAT64 (1ull << 50)
+#define MLX5_FLOW_ACTION_JUMP_TO_TABLE_INDEX (1ull << 51)
#define MLX5_FLOW_DROP_INCLUSIVE_ACTIONS \
(MLX5_FLOW_ACTION_COUNT | MLX5_FLOW_ACTION_SAMPLE | MLX5_FLOW_ACTION_AGE)
@@ -408,12 +409,14 @@ enum mlx5_feature_name {
MLX5_FLOW_ACTION_DEFAULT_MISS | \
MLX5_FLOW_ACTION_METER_WITH_TERMINATED_POLICY | \
MLX5_FLOW_ACTION_SEND_TO_KERNEL | \
- MLX5_FLOW_ACTION_PORT_REPRESENTOR)
+ MLX5_FLOW_ACTION_PORT_REPRESENTOR | \
+ MLX5_FLOW_ACTION_JUMP_TO_TABLE_INDEX)
#define MLX5_FLOW_FATE_ESWITCH_ACTIONS \
(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_PORT_ID | \
MLX5_FLOW_ACTION_SEND_TO_KERNEL | \
- MLX5_FLOW_ACTION_JUMP | MLX5_FLOW_ACTION_METER_WITH_TERMINATED_POLICY)
+ MLX5_FLOW_ACTION_JUMP | MLX5_FLOW_ACTION_METER_WITH_TERMINATED_POLICY | \
+ MLX5_FLOW_ACTION_JUMP_TO_TABLE_INDEX)
#define MLX5_FLOW_MODIFY_HDR_ACTIONS (MLX5_FLOW_ACTION_SET_IPV4_SRC | \
MLX5_FLOW_ACTION_SET_IPV4_DST | \
@@ -1704,6 +1707,7 @@ struct mlx5_flow_template_table_cfg {
struct mlx5_matcher_info {
struct mlx5dr_matcher *matcher; /* Template matcher. */
+ struct mlx5dr_action *jump; /* Jump to matcher action. */
RTE_ATOMIC(uint32_t) refcnt;
};
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 6c8404ee2c..2de89ab58e 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -729,6 +729,9 @@ flow_hw_action_flags_get(const struct rte_flow_action actions[],
case MLX5_RTE_FLOW_ACTION_TYPE_DEFAULT_MISS:
action_flags |= MLX5_FLOW_ACTION_DEFAULT_MISS;
break;
+ case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
+ action_flags |= MLX5_FLOW_ACTION_JUMP_TO_TABLE_INDEX;
+ break;
case RTE_FLOW_ACTION_TYPE_VOID:
case RTE_FLOW_ACTION_TYPE_END:
break;
@@ -2925,6 +2928,34 @@ __flow_hw_translate_actions_template(struct rte_eth_dev *dev,
src_pos, dr_pos))
goto err;
break;
+ case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
+ if (masks->conf &&
+ ((const struct rte_flow_action_jump_to_table_index *)
+ masks->conf)->table) {
+ struct rte_flow_template_table *jump_table =
+ ((const struct rte_flow_action_jump_to_table_index *)
+ actions->conf)->table;
+ acts->rule_acts[dr_pos].jump_to_matcher.offset =
+ ((const struct rte_flow_action_jump_to_table_index *)
+ actions->conf)->index;
+ if (likely(!rte_flow_template_table_resizable(dev->data->port_id,
+ &jump_table->cfg.attr))) {
+ acts->rule_acts[dr_pos].action =
+ jump_table->matcher_info[0].jump;
+ } else {
+ uint32_t selector;
+ rte_rwlock_read_lock(&jump_table->matcher_replace_rwlk);
+ selector = jump_table->matcher_selector;
+ acts->rule_acts[dr_pos].action =
+ jump_table->matcher_info[selector].jump;
+ rte_rwlock_read_unlock(&jump_table->matcher_replace_rwlk);
+ }
+ } else if (__flow_hw_act_data_general_append
+ (priv, acts, actions->type,
+ src_pos, dr_pos)){
+ goto err;
+ }
+ break;
case RTE_FLOW_ACTION_TYPE_END:
actions_end = true;
break;
@@ -3527,6 +3558,7 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
cnt_id_t cnt_id;
uint32_t *cnt_queue;
uint32_t mtr_id;
+ struct rte_flow_template_table *jump_table;
action = &actions[act_data->action_src];
/*
@@ -3759,6 +3791,25 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
rule_acts[act_data->action_dst].action =
priv->action_nat64[table->type][nat64_c->type];
break;
+ case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
+ jump_table = ((const struct rte_flow_action_jump_to_table_index *)
+ action->conf)->table;
+ if (likely(!rte_flow_template_table_resizable(dev->data->port_id,
+ &table->cfg.attr))) {
+ rule_acts[act_data->action_dst].action =
+ jump_table->matcher_info[0].jump;
+ } else {
+ uint32_t selector;
+ rte_rwlock_read_lock(&table->matcher_replace_rwlk);
+ selector = table->matcher_selector;
+ rule_acts[act_data->action_dst].action =
+ jump_table->matcher_info[selector].jump;
+ rte_rwlock_read_unlock(&table->matcher_replace_rwlk);
+ }
+ rule_acts[act_data->action_dst].jump_to_matcher.offset =
+ ((const struct rte_flow_action_jump_to_table_index *)
+ action->conf)->index;
+ break;
default:
break;
}
@@ -4963,6 +5014,10 @@ flow_hw_table_create(struct rte_eth_dev *dev,
};
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5dr_matcher_attr matcher_attr = {0};
+ struct mlx5dr_action_jump_to_matcher_attr jump_attr = {
+ .type = MLX5DR_ACTION_JUMP_TO_MATCHER_BY_INDEX,
+ .matcher = NULL,
+ };
struct rte_flow_template_table *tbl = NULL;
struct mlx5_flow_group *grp;
struct mlx5dr_match_template *mt[MLX5_HW_TBL_MAX_ITEM_TEMPLATE];
@@ -5153,6 +5208,13 @@ flow_hw_table_create(struct rte_eth_dev *dev,
tbl->type = attr->flow_attr.transfer ? MLX5DR_TABLE_TYPE_FDB :
(attr->flow_attr.egress ? MLX5DR_TABLE_TYPE_NIC_TX :
MLX5DR_TABLE_TYPE_NIC_RX);
+ if (matcher_attr.isolated) {
+ jump_attr.matcher = tbl->matcher_info[0].matcher;
+ tbl->matcher_info[0].jump = mlx5dr_action_create_jump_to_matcher(priv->dr_ctx,
+ &jump_attr, mlx5_hw_act_flag[!!attr->flow_attr.group][tbl->type]);
+ if (!tbl->matcher_info[0].jump)
+ goto jtm_error;
+ }
/*
* Only the matcher supports update and needs more than 1 WQE, an additional
* index is needed. Or else the flow index can be reused.
@@ -5175,6 +5237,9 @@ flow_hw_table_create(struct rte_eth_dev *dev,
rte_rwlock_init(&tbl->matcher_replace_rwlk);
return tbl;
res_error:
+ if (tbl->matcher_info[0].jump)
+ mlx5dr_action_destroy(tbl->matcher_info[0].jump);
+jtm_error:
if (tbl->matcher_info[0].matcher)
(void)mlx5dr_matcher_destroy(tbl->matcher_info[0].matcher);
at_error:
@@ -5439,8 +5504,12 @@ flow_hw_table_destroy(struct rte_eth_dev *dev,
1, rte_memory_order_relaxed);
}
flow_hw_destroy_table_multi_pattern_ctx(table);
+ if (table->matcher_info[0].jump)
+ mlx5dr_action_destroy(table->matcher_info[0].jump);
if (table->matcher_info[0].matcher)
mlx5dr_matcher_destroy(table->matcher_info[0].matcher);
+ if (table->matcher_info[1].jump)
+ mlx5dr_action_destroy(table->matcher_info[1].jump);
if (table->matcher_info[1].matcher)
mlx5dr_matcher_destroy(table->matcher_info[1].matcher);
mlx5_hlist_unregister(priv->sh->groups, &table->grp->entry);
@@ -6545,6 +6614,7 @@ flow_hw_template_expand_modify_field(struct rte_flow_action actions[],
case RTE_FLOW_ACTION_TYPE_DROP:
case RTE_FLOW_ACTION_TYPE_SEND_TO_KERNEL:
case RTE_FLOW_ACTION_TYPE_JUMP:
+ case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
case RTE_FLOW_ACTION_TYPE_QUEUE:
case RTE_FLOW_ACTION_TYPE_RSS:
case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
@@ -6761,6 +6831,43 @@ flow_hw_validate_action_jump(struct rte_eth_dev *dev,
return 0;
}
+static int
+mlx5_flow_validate_action_jump_to_table_index(const struct rte_flow_action *action,
+ const struct rte_flow_action *mask,
+ struct rte_flow_error *error)
+{
+ const struct rte_flow_action_jump_to_table_index *m = mask->conf;
+ const struct rte_flow_action_jump_to_table_index *v = action->conf;
+ struct mlx5dr_action *jump_action;
+ uint32_t t_group = 0;
+
+ if (!m || !m->table)
+ return 0;
+ if (!v)
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION, action,
+ "Invalid jump to matcher action configuration");
+ t_group = v->table->grp->group_id;
+ if (t_group == 0)
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION, action,
+ "Unsupported action - jump to root table");
+ if (likely(!rte_flow_template_table_resizable(0, &v->table->cfg.attr))) {
+ jump_action = v->table->matcher_info[0].jump;
+ } else {
+ uint32_t selector;
+ rte_rwlock_read_lock(&v->table->matcher_replace_rwlk);
+ selector = v->table->matcher_selector;
+ jump_action = v->table->matcher_info[selector].jump;
+ rte_rwlock_read_unlock(&v->table->matcher_replace_rwlk);
+ }
+ if (jump_action == NULL)
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION, action,
+ "Unsupported action - table is not an rule array");
+ return 0;
+}
+
static int
mlx5_hw_validate_action_mark(struct rte_eth_dev *dev,
const struct rte_flow_action *template_action,
@@ -7242,6 +7349,12 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
return ret;
action_flags |= MLX5_FLOW_ACTION_DEFAULT_MISS;
break;
+ case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
+ ret = mlx5_flow_validate_action_jump_to_table_index(action, mask, error);
+ if (ret < 0)
+ return ret;
+ action_flags |= MLX5_FLOW_ACTION_JUMP_TO_TABLE_INDEX;
+ break;
default:
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -7286,6 +7399,7 @@ static enum mlx5dr_action_type mlx5_hw_dr_action_types[] = {
[RTE_FLOW_ACTION_TYPE_IPV6_EXT_PUSH] = MLX5DR_ACTION_TYP_PUSH_IPV6_ROUTE_EXT,
[RTE_FLOW_ACTION_TYPE_IPV6_EXT_REMOVE] = MLX5DR_ACTION_TYP_POP_IPV6_ROUTE_EXT,
[RTE_FLOW_ACTION_TYPE_NAT64] = MLX5DR_ACTION_TYP_NAT64,
+ [RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX] = MLX5DR_ACTION_TYP_JUMP_TO_MATCHER,
};
static inline void
@@ -7513,6 +7627,11 @@ flow_hw_parse_flow_actions_to_dr_actions(struct rte_eth_dev *dev,
at->dr_off[i] = curr_off;
action_types[curr_off++] = MLX5DR_ACTION_TYP_MISS;
break;
+ case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
+ *tmpl_flags |= MLX5DR_ACTION_TEMPLATE_FLAG_RELAXED_ORDER;
+ at->dr_off[i] = curr_off;
+ action_types[curr_off++] = MLX5DR_ACTION_TYP_JUMP_TO_MATCHER;
+ break;
default:
type = mlx5_hw_dr_action_types[at->actions[i].type];
at->dr_off[i] = curr_off;
@@ -13949,6 +14068,7 @@ mlx5_mirror_destroy_clone(struct rte_eth_dev *dev,
case RTE_FLOW_ACTION_TYPE_JUMP:
flow_hw_jump_release(dev, clone->action_ctx);
break;
+ case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR:
case RTE_FLOW_ACTION_TYPE_RAW_ENCAP:
@@ -13982,6 +14102,7 @@ mlx5_mirror_terminal_action(const struct rte_flow_action *action)
case RTE_FLOW_ACTION_TYPE_QUEUE:
case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR:
+ case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
return true;
default:
break;
@@ -14024,6 +14145,8 @@ mlx5_mirror_validate_sample_action(struct rte_eth_dev *dev,
action[1].type != RTE_FLOW_ACTION_TYPE_RAW_ENCAP)
return false;
break;
+ case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
+ break;
default:
return false;
}
@@ -14758,8 +14881,14 @@ flow_hw_table_resize(struct rte_eth_dev *dev,
struct mlx5dr_action_template *at[MLX5_HW_TBL_MAX_ACTION_TEMPLATE];
struct mlx5dr_match_template *mt[MLX5_HW_TBL_MAX_ITEM_TEMPLATE];
struct mlx5dr_matcher_attr matcher_attr = table->matcher_attr;
+ struct mlx5dr_action_jump_to_matcher_attr jump_attr = {
+ .type = MLX5DR_ACTION_JUMP_TO_MATCHER_BY_INDEX,
+ .matcher = NULL,
+ };
struct mlx5_multi_pattern_segment *segment = NULL;
struct mlx5dr_matcher *matcher = NULL;
+ struct mlx5dr_action *jump = NULL;
+ struct mlx5_priv *priv = dev->data->dev_private;
uint32_t i, selector = table->matcher_selector;
uint32_t other_selector = (selector + 1) & 1;
int ret;
@@ -14807,6 +14936,17 @@ flow_hw_table_resize(struct rte_eth_dev *dev,
table, "failed to create new matcher");
goto error;
}
+ if (matcher_attr.isolated) {
+ jump_attr.matcher = matcher;
+ jump = mlx5dr_action_create_jump_to_matcher(priv->dr_ctx, &jump_attr,
+ mlx5_hw_act_flag[!!table->cfg.attr.flow_attr.group][table->type]);
+ if (!jump) {
+ ret = rte_flow_error_set(error, rte_errno,
+ RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+ table, "failed to create jump to matcher action");
+ goto error;
+ }
+ }
rte_rwlock_write_lock(&table->matcher_replace_rwlk);
ret = mlx5dr_matcher_resize_set_target
(table->matcher_info[selector].matcher, matcher);
@@ -14819,6 +14959,7 @@ flow_hw_table_resize(struct rte_eth_dev *dev,
}
table->cfg.attr.nb_flows = nb_flows;
table->matcher_info[other_selector].matcher = matcher;
+ table->matcher_info[other_selector].jump = jump;
table->matcher_selector = other_selector;
rte_atomic_store_explicit(&table->matcher_info[other_selector].refcnt,
0, rte_memory_order_relaxed);
@@ -14827,6 +14968,8 @@ flow_hw_table_resize(struct rte_eth_dev *dev,
error:
if (segment)
mlx5_destroy_multi_pattern_segment(segment);
+ if (jump)
+ mlx5dr_action_destroy(jump);
if (matcher) {
ret = mlx5dr_matcher_destroy(matcher);
return rte_flow_error_set(error, rte_errno,
@@ -14857,6 +15000,8 @@ flow_hw_table_resize_complete(__rte_unused struct rte_eth_dev *dev,
return rte_flow_error_set(error, EBUSY,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
table, "cannot complete table resize");
+ if (matcher_info->jump)
+ mlx5dr_action_destroy(matcher_info->jump);
ret = mlx5dr_matcher_destroy(matcher_info->matcher);
if (ret)
return rte_flow_error_set(error, rte_errno,
--
2.18.2
^ permalink raw reply [flat|nested] 5+ messages in thread