From: Wisam Monther <wisamm@mellanox.com>
To: "dev@dpdk.org" <dev@dpdk.org>,
Raslan Darawsheh <rasland@mellanox.com>,
Matan Azrad <matan@mellanox.com>
Cc: Slava Ovsiienko <viacheslavo@mellanox.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix zero value check for set tag action
Date: Thu, 12 Mar 2020 09:35:47 +0000 [thread overview]
Message-ID: <AM0PR05MB66104D76D6E7236E1E23AA18A9FD0@AM0PR05MB6610.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1583759523-25392-1-git-send-email-wisamm@mellanox.com>
-----Original Message-----
From: Wisam Monther <wisamm@mellanox.com>
Sent: Monday, March 9, 2020 3:13 PM
To: dev@dpdk.org; Raslan Darawsheh <rasland@mellanox.com>; Matan Azrad <matan@mellanox.com>
Cc: Slava Ovsiienko <viacheslavo@mellanox.com>; stable@dpdk.org
Subject: [PATCH] net/mlx5: fix zero value check for set tag action
If we allow to have data <xxx> and mask <0x0> we might hit a zero data value that will not do any effect
Fixes: e554b672aa05 ("net/mlx5: support flow tag")
Cc: viacheslavo@mellanox.com
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index e7278f0..edd0065 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2160,6 +2160,10 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"zero mask doesn't have any effect");
+ if (!(conf->data & conf->mask))
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION, action,
+ "zero value has no effect");
ret = mlx5_flow_get_reg_id(dev, MLX5_APP_TAG, conf->index, error);
if (ret < 0)
return ret;
--
2.7.4
Hey Guys,
This patch not relevant anymore
Thanks,
Wisam Jaddo
prev parent reply other threads:[~2020-03-12 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 13:12 Wisam Jaddo
2020-03-12 9:35 ` Wisam Monther [this message]
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=AM0PR05MB66104D76D6E7236E1E23AA18A9FD0@AM0PR05MB6610.eurprd05.prod.outlook.com \
--to=wisamm@mellanox.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=rasland@mellanox.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@mellanox.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).