[dpdk-stable] patch 'net/ixgbe: fix flow create in ntuple check' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Thu Nov 22 17:49:41 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/28/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 54952111c26539f4ca0449adf04eed0416be2099 Mon Sep 17 00:00:00 2001
From: Faicker Mo <faicker.mo at ucloud.cn>
Date: Tue, 18 Sep 2018 13:48:52 +0800
Subject: [PATCH] net/ixgbe: fix flow create in ntuple check

[ upstream commit d0dd0cf06135ec043c587bf14b66ec55adde876a ]

In ixgbe_flow_create function, ntuple filter is parsed first. If the
flow is considered to be ntuple filter, it will not go on to judge
ethertype filter, syn filter and fdir filter.
In the function ntuple_filter_to_5tuple, 5 tuple info is checked,
but it's too late to jump over the ntuple filter if it's a fdir filter.

Fixes: 46ea969177f3 ("net/ixgbe: add ntuple support to flow parser")

Signed-off-by: Faicker Mo <faicker.mo at ucloud.cn>
Acked-by: Wei Zhao <wei.zhao1 at intel.com>
---
 drivers/net/ixgbe/ixgbe_flow.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 1adf1b803..f0fafebc8 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -364,4 +364,15 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr,
 			return -rte_errno;
 		}
+		if ((ipv4_mask->hdr.src_addr != 0 &&
+			ipv4_mask->hdr.src_addr != UINT32_MAX) ||
+			(ipv4_mask->hdr.dst_addr != 0 &&
+			ipv4_mask->hdr.dst_addr != UINT32_MAX) ||
+			(ipv4_mask->hdr.next_proto_id != UINT8_MAX &&
+			ipv4_mask->hdr.next_proto_id != 0)) {
+			rte_flow_error_set(error,
+				EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
+				item, "Not supported by ntuple filter");
+			return -rte_errno;
+		}
 
 		filter->dst_ip_mask = ipv4_mask->hdr.dst_addr;
@@ -433,4 +444,13 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr,
 			return -rte_errno;
 		}
+		if ((tcp_mask->hdr.src_port != 0 &&
+			tcp_mask->hdr.src_port != UINT16_MAX) ||
+			(tcp_mask->hdr.dst_port != 0 &&
+			tcp_mask->hdr.dst_port != UINT16_MAX)) {
+			rte_flow_error_set(error,
+				EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
+				item, "Not supported by ntuple filter");
+			return -rte_errno;
+		}
 
 		filter->dst_port_mask  = tcp_mask->hdr.dst_port;
@@ -468,4 +488,13 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr,
 			return -rte_errno;
 		}
+		if ((udp_mask->hdr.src_port != 0 &&
+			udp_mask->hdr.src_port != UINT16_MAX) ||
+			(udp_mask->hdr.dst_port != 0 &&
+			udp_mask->hdr.dst_port != UINT16_MAX)) {
+			rte_flow_error_set(error,
+				EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
+				item, "Not supported by ntuple filter");
+			return -rte_errno;
+		}
 
 		filter->dst_port_mask = udp_mask->hdr.dst_port;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-22 16:47:33.540783379 +0000
+++ 0049-net-ixgbe-fix-flow-create-in-ntuple-check.patch	2018-11-22 16:47:32.000000000 +0000
@@ -1,8 +1,10 @@
-From d0dd0cf06135ec043c587bf14b66ec55adde876a Mon Sep 17 00:00:00 2001
+From 54952111c26539f4ca0449adf04eed0416be2099 Mon Sep 17 00:00:00 2001
 From: Faicker Mo <faicker.mo at ucloud.cn>
 Date: Tue, 18 Sep 2018 13:48:52 +0800
 Subject: [PATCH] net/ixgbe: fix flow create in ntuple check
 
+[ upstream commit d0dd0cf06135ec043c587bf14b66ec55adde876a ]
+
 In ixgbe_flow_create function, ntuple filter is parsed first. If the
 flow is considered to be ntuple filter, it will not go on to judge
 ethertype filter, syn filter and fdir filter.
@@ -10,7 +12,6 @@
 but it's too late to jump over the ntuple filter if it's a fdir filter.
 
 Fixes: 46ea969177f3 ("net/ixgbe: add ntuple support to flow parser")
-Cc: stable at dpdk.org
 
 Signed-off-by: Faicker Mo <faicker.mo at ucloud.cn>
 Acked-by: Wei Zhao <wei.zhao1 at intel.com>


More information about the stable mailing list