From: Jiawei Wang <jiaweiw@nvidia.com>
To: viacheslavo@nvidia.com, matan@nvidia.com, orika@nvidia.com,
thomas@monjalon.net
Cc: dev@dpdk.org, rasland@nvidia.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] net/mlx5: use global default miss for E-Switch sampling
Date: Tue, 26 Jan 2021 14:53:33 +0200 [thread overview]
Message-ID: <1611665613-123388-3-git-send-email-jiaweiw@nvidia.com> (raw)
In-Reply-To: <1611665613-123388-1-git-send-email-jiaweiw@nvidia.com>
In E-Switch steering domain there was dedicated default miss action
created for every sampling flow.
The patch replaces this one with the global default miss action.
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.h | 1 -
drivers/net/mlx5/mlx5_flow_dv.c | 23 +++++------------------
2 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 2178a04..e9e3397 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -598,7 +598,6 @@ struct mlx5_flow_dv_sample_resource {
uint32_t ratio; /** Sample Ratio */
uint64_t set_action; /** Restore reg_c0 value */
void *normal_path_tbl; /** Flow Table pointer */
- void *default_miss; /** default_miss dr_action. */
struct mlx5_flow_sub_actions_idx sample_idx;
/**< Action index resources. */
struct mlx5_flow_sub_actions_list sample_act;
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 27d711d..5845b98 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9149,22 +9149,18 @@ struct mlx5_cache_entry *
"for sample");
goto error;
}
- int ret;
-
cache_resource->normal_path_tbl = tbl;
if (resource->ft_type == MLX5DV_FLOW_TABLE_TYPE_FDB) {
- ret = mlx5_flow_os_create_flow_action_default_miss
- (&cache_resource->default_miss);
- if (ret) {
+ if (!sh->default_miss_action) {
rte_flow_error_set(error, ENOMEM,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL,
- "cannot create default miss "
- "action");
+ "default miss action was not "
+ "created");
goto error;
}
sample_dv_actions[resource->sample_act.actions_num++] =
- cache_resource->default_miss;
+ sh->default_miss_action;
}
/* Create a DR sample action */
sampler_attr.sample_ratio = cache_resource->ratio;
@@ -9184,11 +9180,7 @@ struct mlx5_cache_entry *
cache_resource->dev = dev;
return &cache_resource->entry;
error:
- if (cache_resource->ft_type == MLX5DV_FLOW_TABLE_TYPE_FDB &&
- cache_resource->default_miss)
- claim_zero(mlx5_flow_os_destroy_flow_action
- (cache_resource->default_miss));
- else
+ if (cache_resource->ft_type != MLX5DV_FLOW_TABLE_TYPE_FDB)
flow_dv_sample_sub_actions_release(dev,
&cache_resource->sample_idx);
if (cache_resource->normal_path_tbl)
@@ -11591,11 +11583,6 @@ struct mlx5_cache_entry *
if (cache_resource->verbs_action)
claim_zero(mlx5_flow_os_destroy_flow_action
(cache_resource->verbs_action));
- if (cache_resource->ft_type == MLX5DV_FLOW_TABLE_TYPE_FDB) {
- if (cache_resource->default_miss)
- claim_zero(mlx5_flow_os_destroy_flow_action
- (cache_resource->default_miss));
- }
if (cache_resource->normal_path_tbl)
flow_dv_tbl_resource_release(MLX5_SH(dev),
cache_resource->normal_path_tbl);
--
1.8.3.1
next prev parent reply other threads:[~2021-01-26 12:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 12:53 [dpdk-dev] [PATCH 0/2] " Jiawei Wang
2021-01-26 12:53 ` [dpdk-dev] [PATCH 1/2] net/mlx5: fix the E-Switch sample action creation failure Jiawei Wang
2021-01-26 12:53 ` Jiawei Wang [this message]
2021-01-27 12:50 ` [dpdk-dev] [dpdk-stable] [PATCH 2/2] net/mlx5: use global default miss for E-Switch sampling Ferruh Yigit
2021-01-27 12:54 ` Thomas Monjalon
2021-01-27 15:25 ` Jiawei(Jonny) Wang
2021-01-27 12:29 ` [dpdk-dev] [PATCH 0/2] " Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1611665613-123388-3-git-send-email-jiaweiw@nvidia.com \
--to=jiaweiw@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).