From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Shahaf Shuler <shahafs@mellanox.com>, Yongseok Koh <yskoh@mellanox.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/mlx5: fix artificial L4 limitation on switch flow rules
Date: Mon, 6 Aug 2018 16:25:42 +0200 [thread overview]
Message-ID: <20180806142454.31907-1-adrien.mazarguil@6wind.com> (raw)
Partial bit-masks are in fact supported on TCP/UDP source/destination
ports. Remove unnecessary check.
Fixes: 2bfc777e07 ("net/mlx5: add L2-L4 pattern items to switch flow rules")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx5/mlx5_nl_flow.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_nl_flow.c b/drivers/net/mlx5/mlx5_nl_flow.c
index a1c8c340b..beb03c911 100644
--- a/drivers/net/mlx5/mlx5_nl_flow.c
+++ b/drivers/net/mlx5/mlx5_nl_flow.c
@@ -800,16 +800,6 @@ mlx5_nl_flow_transpose(void *buf,
}
spec.tcp = item->spec;
if ((mask.tcp->hdr.src_port &&
- mask.tcp->hdr.src_port != RTE_BE16(0xffff)) ||
- (mask.tcp->hdr.dst_port &&
- mask.tcp->hdr.dst_port != RTE_BE16(0xffff)))
- return rte_flow_error_set
- (error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM_MASK,
- mask.tcp,
- "no support for partial masks on"
- " \"hdr.src_port\" and \"hdr.dst_port\""
- " fields");
- if ((mask.tcp->hdr.src_port &&
(!mnl_attr_put_u16_check(buf, size,
TCA_FLOWER_KEY_TCP_SRC,
spec.tcp->hdr.src_port) ||
@@ -847,16 +837,6 @@ mlx5_nl_flow_transpose(void *buf,
}
spec.udp = item->spec;
if ((mask.udp->hdr.src_port &&
- mask.udp->hdr.src_port != RTE_BE16(0xffff)) ||
- (mask.udp->hdr.dst_port &&
- mask.udp->hdr.dst_port != RTE_BE16(0xffff)))
- return rte_flow_error_set
- (error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM_MASK,
- mask.udp,
- "no support for partial masks on"
- " \"hdr.src_port\" and \"hdr.dst_port\""
- " fields");
- if ((mask.udp->hdr.src_port &&
(!mnl_attr_put_u16_check(buf, size,
TCA_FLOWER_KEY_UDP_SRC,
spec.udp->hdr.src_port) ||
--
2.11.0
next reply other threads:[~2018-08-06 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-06 14:25 Adrien Mazarguil [this message]
2018-08-15 7:30 ` Shahaf Shuler
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=20180806142454.31907-1-adrien.mazarguil@6wind.com \
--to=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=shahafs@mellanox.com \
--cc=yskoh@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).