* [dpdk-stable] [PATCH 1/2] net/mlx5: fix the E-Switch sample action creation failure [not found] <1611665613-123388-1-git-send-email-jiaweiw@nvidia.com> @ 2021-01-26 12:53 ` Jiawei Wang 2021-01-26 12:53 ` [dpdk-stable] [PATCH 2/2] net/mlx5: use global default miss for E-Switch sampling Jiawei Wang 1 sibling, 0 replies; 6+ messages in thread From: Jiawei Wang @ 2021-01-26 12:53 UTC (permalink / raw) To: viacheslavo, matan, orika, thomas; +Cc: dev, rasland, stable This patch fixes the incorrect checking for the return value of default miss action creation. Fixes: 14020ad53d4e ("net/mlx5: wrap default miss flow action per OS") Cc: stable@dpdk.org Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> --- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 1a0c0be..27d711d 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9155,7 +9155,7 @@ struct mlx5_cache_entry * 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 (ret) { rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, -- 1.8.3.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-stable] [PATCH 2/2] net/mlx5: use global default miss for E-Switch sampling [not found] <1611665613-123388-1-git-send-email-jiaweiw@nvidia.com> 2021-01-26 12:53 ` [dpdk-stable] [PATCH 1/2] net/mlx5: fix the E-Switch sample action creation failure Jiawei Wang @ 2021-01-26 12:53 ` Jiawei Wang 2021-01-27 12:50 ` Ferruh Yigit 1 sibling, 1 reply; 6+ messages in thread From: Jiawei Wang @ 2021-01-26 12:53 UTC (permalink / raw) To: viacheslavo, matan, orika, thomas; +Cc: dev, rasland, stable 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH 2/2] net/mlx5: use global default miss for E-Switch sampling 2021-01-26 12:53 ` [dpdk-stable] [PATCH 2/2] net/mlx5: use global default miss for E-Switch sampling Jiawei Wang @ 2021-01-27 12:50 ` Ferruh Yigit 2021-01-27 12:54 ` Thomas Monjalon 2021-01-27 15:25 ` Jiawei(Jonny) Wang 0 siblings, 2 replies; 6+ messages in thread From: Ferruh Yigit @ 2021-01-27 12:50 UTC (permalink / raw) To: Jiawei Wang, viacheslavo, matan, orika, thomas Cc: dev, rasland, stable, Kevin Traynor, Luca Boccassi On 1/26/2021 12:53 PM, Jiawei Wang wrote: > 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. > Hi Jiawei, The impact of the patch is not clear, what was the problem using action per flow? What will change when global action is used? Is this fixing some problem or is it optimization by preventing per flow action? > Cc: stable@dpdk.org > Since this looks like optimization, I am removing the stable tag for now. If it is a fix, please reply with a fixes line, I can update it in next-net. > Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> > Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH 2/2] net/mlx5: use global default miss for E-Switch sampling 2021-01-27 12:50 ` Ferruh Yigit @ 2021-01-27 12:54 ` Thomas Monjalon 2021-01-27 15:25 ` Jiawei(Jonny) Wang 1 sibling, 0 replies; 6+ messages in thread From: Thomas Monjalon @ 2021-01-27 12:54 UTC (permalink / raw) To: Jiawei Wang, viacheslavo, matan, orika, Ferruh Yigit Cc: dev, rasland, stable, Kevin Traynor, Luca Boccassi 27/01/2021 13:50, Ferruh Yigit: > On 1/26/2021 12:53 PM, Jiawei Wang wrote: > > 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. > > > > Hi Jiawei, > > The impact of the patch is not clear, what was the problem using action per > flow? What will change when global action is used? Is this fixing some problem > or is it optimization by preventing per flow action? > > > Cc: stable@dpdk.org > > > > Since this looks like optimization, I am removing the stable tag for now. > > If it is a fix, please reply with a fixes line, I can update it in next-net. Yes please we must avoid "Cc: stable" without a "Fixes:" line. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH 2/2] net/mlx5: use global default miss for E-Switch sampling 2021-01-27 12:50 ` Ferruh Yigit 2021-01-27 12:54 ` Thomas Monjalon @ 2021-01-27 15:25 ` Jiawei(Jonny) Wang 1 sibling, 0 replies; 6+ messages in thread From: Jiawei(Jonny) Wang @ 2021-01-27 15:25 UTC (permalink / raw) To: Ferruh Yigit, Slava Ovsiienko, Matan Azrad, Ori Kam, NBU-Contact-Thomas Monjalon Cc: dev, Raslan Darawsheh, stable, Kevin Traynor, Luca Boccassi Hi Ferruh, > -----Original Message----- > From: Ferruh Yigit <ferruh.yigit@intel.com> > Sent: Wednesday, January 27, 2021 8:50 PM > To: Jiawei(Jonny) Wang <jiaweiw@nvidia.com>; Slava Ovsiienko > <viacheslavo@nvidia.com>; Matan Azrad <matan@nvidia.com>; Ori Kam > <orika@nvidia.com>; NBU-Contact-Thomas Monjalon > <thomas@monjalon.net> > Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>; > stable@dpdk.org; Kevin Traynor <ktraynor@redhat.com>; Luca Boccassi > <bluca@debian.org> > Subject: Re: [dpdk-stable] [PATCH 2/2] net/mlx5: use global default miss for > E-Switch sampling > > On 1/26/2021 12:53 PM, Jiawei Wang wrote: > > 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. > > > > Hi Jiawei, > > The impact of the patch is not clear, what was the problem using action per > flow? What will change when global action is used? Is this fixing some > problem or is it optimization by preventing per flow action? > The patch is optimization not fix, MLX5 PMD can reuses the global action don’t need allocate new one each time. > > Cc: stable@dpdk.org > > > > Since this looks like optimization, I am removing the stable tag for now. Yes, please remove this tag. Thanks. > > If it is a fix, please reply with a fixes line, I can update it in next-net. > > > Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> > > Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <1611665298-122181-1-git-send-email-jiaweiw@nvidia.com>]
* [dpdk-stable] [PATCH 2/2] net/mlx5: use global default miss for E-Switch sampling [not found] <1611665298-122181-1-git-send-email-jiaweiw@nvidia.com> @ 2021-01-26 12:48 ` Jiawei Wang 0 siblings, 0 replies; 6+ messages in thread From: Jiawei Wang @ 2021-01-26 12:48 UTC (permalink / raw) To: jiaweiw; +Cc: stable 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-27 15:25 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1611665613-123388-1-git-send-email-jiaweiw@nvidia.com> 2021-01-26 12:53 ` [dpdk-stable] [PATCH 1/2] net/mlx5: fix the E-Switch sample action creation failure Jiawei Wang 2021-01-26 12:53 ` [dpdk-stable] [PATCH 2/2] net/mlx5: use global default miss for E-Switch sampling Jiawei Wang 2021-01-27 12:50 ` Ferruh Yigit 2021-01-27 12:54 ` Thomas Monjalon 2021-01-27 15:25 ` Jiawei(Jonny) Wang [not found] <1611665298-122181-1-git-send-email-jiaweiw@nvidia.com> 2021-01-26 12:48 ` Jiawei Wang
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).