From: Raja Zidane <rzidane@nvidia.com>
To: <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>, Gregory Etelson <getelson@nvidia.com>
Subject: [PATCH] net/mlx5: block negative integrity flows
Date: Wed, 15 Jun 2022 14:27:28 +0300 [thread overview]
Message-ID: <20220615112728.14956-1-rzidane@nvidia.com> (raw)
Negative integrity flows are supported, but malfunctioning due to a
bug, and an API change is necessary to fix.
Drop negative flow support for now.
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Gregory Etelson <getelson@nvidia.com>
---
doc/guides/nics/mlx5.rst | 4 +++-
drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index f41703277e..f28a874006 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -467,7 +467,9 @@ Limitations
TCP or UDP, must be in the rule pattern as well::
flow create 0 ingress pattern integrity level is 0 value mask l3_ok value spec l3_ok / eth / ipv6 / end …
- or
+
+ Negative integrity flows are not supported. i.e.
+
flow create 0 ingress pattern integrity level is 0 value mask l4_ok value spec 0 / eth / ipv4 proto is udp / end …
- Connection tracking:
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 65b02b20ce..f82986ac31 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6809,6 +6809,12 @@ flow_dv_validate_item_integrity(struct rte_eth_dev *dev,
RTE_FLOW_ERROR_TYPE_ITEM,
integrity_item,
"unsupported integrity filter");
+ if ((mask->l3_ok & !spec->l3_ok) || (mask->l4_ok & !spec->l4_ok) ||
+ (mask->ipv4_csum_ok & !spec->ipv4_csum_ok) ||
+ (mask->l4_csum_ok & !spec->l4_csum_ok))
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ NULL, "negative integrity flow is not supported");
if (spec->level > 1) {
if (pattern_flags & MLX5_FLOW_ITEM_INNER_INTEGRITY)
return rte_flow_error_set
--
2.21.0
reply other threads:[~2022-06-15 11:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220615112728.14956-1-rzidane@nvidia.com \
--to=rzidane@nvidia.com \
--cc=dev@dpdk.org \
--cc=getelson@nvidia.com \
--cc=matan@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).