* [dpdk-dev] [PATCH] net/mlx5: fix suffix flow creation in metadata split
@ 2019-11-13 8:27 Viacheslav Ovsiienko
2019-11-13 8:52 ` Matan Azrad
2019-11-13 9:50 ` Raslan Darawsheh
0 siblings, 2 replies; 3+ messages in thread
From: Viacheslav Ovsiienko @ 2019-11-13 8:27 UTC (permalink / raw)
To: dev; +Cc: matan, rasland, orika
The variable cleanup was erroneously done before pointer usage.
The cleanup is moved to appropriate place, comment is clarified.
Fixes: 8d72fa668964 ("net/mlx5: share tag between meter and metadata")
Reported-by: Eli Britstein <elibr@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 14a89e2..d677de8 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -3862,16 +3862,18 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
},
};
uint64_t hash_fields = dev_flow->hash_fields;
- dev_flow = NULL;
+
/*
- * Configure the tag action only if we are not the meter sub
- * flow. Since tag is already marked in the meter suffix sub
- * flow.
+ * Configure the tag item only if there is no meter subflow.
+ * Since tag is already marked in the meter suffix subflow
+ * we can just use the meter suffix items as is.
*/
if (qrss_id) {
+ /* Not meter subflow. */
+ assert(!mtr_sfx);
/*
* Put unique id in prefix flow due to it is destroyed
- * after prefix flow and id will be freed after there
+ * after suffix flow and id will be freed after there
* is no actual flows with this id and identifier
* reallocation becomes possible (for example, for
* other flows in other threads).
@@ -3884,6 +3886,7 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
goto exit;
q_tag_spec.id = ret;
}
+ dev_flow = NULL;
/* Add suffix subflow to execute Q/RSS. */
ret = flow_create_split_inner(dev, flow, &dev_flow,
&q_attr, mtr_sfx ? items :
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix suffix flow creation in metadata split
2019-11-13 8:27 [dpdk-dev] [PATCH] net/mlx5: fix suffix flow creation in metadata split Viacheslav Ovsiienko
@ 2019-11-13 8:52 ` Matan Azrad
2019-11-13 9:50 ` Raslan Darawsheh
1 sibling, 0 replies; 3+ messages in thread
From: Matan Azrad @ 2019-11-13 8:52 UTC (permalink / raw)
To: Slava Ovsiienko, dev; +Cc: Raslan Darawsheh, Ori Kam
From: Viacheslav Ovsiienko
> The variable cleanup was erroneously done before pointer usage.
> The cleanup is moved to appropriate place, comment is clarified.
>
> Fixes: 8d72fa668964 ("net/mlx5: share tag between meter and metadata")
>
> Reported-by: Eli Britstein <elibr@mellanox.com>
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix suffix flow creation in metadata split
2019-11-13 8:27 [dpdk-dev] [PATCH] net/mlx5: fix suffix flow creation in metadata split Viacheslav Ovsiienko
2019-11-13 8:52 ` Matan Azrad
@ 2019-11-13 9:50 ` Raslan Darawsheh
1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2019-11-13 9:50 UTC (permalink / raw)
To: Slava Ovsiienko, dev; +Cc: Matan Azrad, Ori Kam
Hi,
> -----Original Message-----
> From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> Sent: Wednesday, November 13, 2019 10:28 AM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@mellanox.com>; Raslan Darawsheh
> <rasland@mellanox.com>; Ori Kam <orika@mellanox.com>
> Subject: [PATCH] net/mlx5: fix suffix flow creation in metadata split
>
> The variable cleanup was erroneously done before pointer usage.
> The cleanup is moved to appropriate place, comment is clarified.
>
> Fixes: 8d72fa668964 ("net/mlx5: share tag between meter and metadata")
>
> Reported-by: Eli Britstein <elibr@mellanox.com>
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 14a89e2..d677de8 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -3862,16 +3862,18 @@ uint32_t mlx5_flow_adjust_priority(struct
> rte_eth_dev *dev, int32_t priority,
> },
> };
> uint64_t hash_fields = dev_flow->hash_fields;
> - dev_flow = NULL;
> +
> /*
> - * Configure the tag action only if we are not the meter sub
> - * flow. Since tag is already marked in the meter suffix sub
> - * flow.
> + * Configure the tag item only if there is no meter subflow.
> + * Since tag is already marked in the meter suffix subflow
> + * we can just use the meter suffix items as is.
> */
> if (qrss_id) {
> + /* Not meter subflow. */
> + assert(!mtr_sfx);
> /*
> * Put unique id in prefix flow due to it is destroyed
> - * after prefix flow and id will be freed after there
> + * after suffix flow and id will be freed after there
> * is no actual flows with this id and identifier
> * reallocation becomes possible (for example, for
> * other flows in other threads).
> @@ -3884,6 +3886,7 @@ uint32_t mlx5_flow_adjust_priority(struct
> rte_eth_dev *dev, int32_t priority,
> goto exit;
> q_tag_spec.id = ret;
> }
> + dev_flow = NULL;
> /* Add suffix subflow to execute Q/RSS. */
> ret = flow_create_split_inner(dev, flow, &dev_flow,
> &q_attr, mtr_sfx ? items :
> --
> 1.8.3.1
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-13 9:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 8:27 [dpdk-dev] [PATCH] net/mlx5: fix suffix flow creation in metadata split Viacheslav Ovsiienko
2019-11-13 8:52 ` Matan Azrad
2019-11-13 9:50 ` Raslan Darawsheh
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).