Skip to contentSkip to conversation

net/ixgbe: put 5tuple check in front to jump over ntuple filter case

PATCH Applied faicker.mo 3 participants 10 messages Sep 18, 2018 – Oct 19, 2018 Network drivers

lore
Share & tools
lore

faicker.mo

author
#0 lore raw

PATCH 1/1 net/ixgbe: put 5tuple check in front to jump over ntuple filter case

From: "faicker.mo" <[email protected]>

Check in func ntuple_filter_to_5tuple is too late for fdir filter rule, add check in func cons_parse_ntuple_filter.

---
 drivers/net/ixgbe/ixgbe_flow.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/net/ixgbe/ixgbe_flow.c +29 -0
index 1adf1b8..f0fafeb 100644
@@ -363,6 +363,17 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_ip_mask = ipv4_mask->hdr.src_addr;
@@ -432,6 +443,15 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask  = tcp_mask->hdr.src_port;
@@ -467,6 +487,15 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask = udp_mask->hdr.src_port;
Signature · 1 line
1.8.3.1
#1 lore raw

Hi Faicker:

Quoted 8 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of faicker.mo
Sent: Tuesday, September 18, 2018 1:49 PM
To: [email protected]
Cc: faicker.mo <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 4 lines

From: "faicker.mo" <[email protected]>

Check in func ntuple_filter_to_5tuple is too late for fdir filter rule, add check in func cons_parse_ntuple_filter.

Would you explain more about the intention for this patch?
Though it can be more fast to reject an invalid flow, but why it is too late in your case?

Thanks
Qi

Quoted 63 lines
---
 drivers/net/ixgbe/ixgbe_flow.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/net/ixgbe/ixgbe_flow.c +11 -0
index 1adf1b8..f0fafeb 100644
@@ -363,6 +363,17 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_ip_mask = ipv4_mask->hdr.src_addr; @@ -432,6 +443,15

@@ const struct rte_flow_action *next_no_void_action(

drivers/net/ixgbe/ixgbe_flow.c +19 -1
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask  = tcp_mask->hdr.src_port; @@ -467,6
+487,15 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask = udp_mask->hdr.src_port;
--

1.8.3.1

author
#2 lore raw

Hi Qi,

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.

Quoted 86 lines · Qi Z

Hi Faicker:

Quoted 8 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of faicker.mo
Sent: Tuesday, September 18, 2018 1:49 PM
To: [email protected]
Cc: faicker.mo <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 4 lines

From: "faicker.mo" <[email protected]>

Check in func ntuple_filter_to_5tuple is too late for fdir filter rule, add check in func cons_parse_ntuple_filter.

Would you explain more about the intention for this patch?
Though it can be more fast to reject an invalid flow, but why it is too late in your case?

Thanks
Qi

Quoted 63 lines
---
 drivers/net/ixgbe/ixgbe_flow.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/net/ixgbe/ixgbe_flow.c +11 -0
index 1adf1b8..f0fafeb 100644
@@ -363,6 +363,17 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_ip_mask = ipv4_mask->hdr.src_addr; @@ -432,6 +443,15

@@ const struct rte_flow_action *next_no_void_action(

drivers/net/ixgbe/ixgbe_flow.c +19 -1
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask  = tcp_mask->hdr.src_port; @@ -467,6
+487,15 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask = udp_mask->hdr.src_port;
--

1.8.3.1

#3 lore raw

OK, got your point. We should not reject a possible valid fdir flow at n-tuple flow check stage.

Thanks
Qi

From: mocan [mailto:[email protected]]
Sent: Wednesday, September 26, 2018 4:16 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi Qi,
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.

Quoted 86 lines · Qi Z

Hi Faicker:

Quoted 8 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of faicker.mo
Sent: Tuesday, September 18, 2018 1:49 PM
To: [email protected]
Cc: faicker.mo <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 4 lines

From: "faicker.mo" <[email protected]>

Check in func ntuple_filter_to_5tuple is too late for fdir filter rule, add check in func cons_parse_ntuple_filter.

Would you explain more about the intention for this patch?
Though it can be more fast to reject an invalid flow, but why it is too late in your case?

Thanks
Qi

Quoted 63 lines
---
 drivers/net/ixgbe/ixgbe_flow.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/net/ixgbe/ixgbe_flow.c +11 -0
index 1adf1b8..f0fafeb 100644
@@ -363,6 +363,17 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_ip_mask = ipv4_mask->hdr.src_addr; @@ -432,6 +443,15

@@ const struct rte_flow_action *next_no_void_action(

drivers/net/ixgbe/ixgbe_flow.c +19 -1
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask  = tcp_mask->hdr.src_port; @@ -467,6
+487,15 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask = udp_mask->hdr.src_port;
--

1.8.3.1

#4 lore raw

Hi,

Quoted 8 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Wednesday, September 26, 2018 7:14 PM
To: mocan <[email protected]>; Zhao1, Wei <[email protected]>
Cc: [email protected]
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 4 lines

OK, got your point. We should not reject a possible valid fdir flow at n-tuple flow check stage.

I agree with the point of " We should not reject a possible valid fdir flow at n-tuple flow check stage". But, I think the fix patch should be more generic for all types filter of this problem. Maybe, we should delete all " goto out" in function ixgbe_flow_create().
Then, it will go to ntuple filter and ethertype filter, syn filter and fdir filter ,l2_tn_filter one by one. And aslo, we should code as

{

Ntuple:
..........
if(ret)
Goto ethertype
..........

Ethertype:

..........
if(ret)
Goto fdir filter
.........

fdir filter:

if(ret)
Goto l2_tn_filter

l2_tn_filter:

.............

}

This fix patch only solve the problem of ntuple and fdir. Qi, What do you think of this?

Quoted 117 lines

Thanks
Qi

From: mocan [mailto:[email protected]]
Sent: Wednesday, September 26, 2018 4:16 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi Qi,
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.

Quoted 8 lines · Qi Z

Hi Faicker:

Quoted 6 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of faicker.mo
Sent: Tuesday, September 18, 2018 1:49 PM
To: [email protected]
Cc: faicker.mo <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump

over

Quoted 5 lines
Quoted 5 lines

ntuple filter case

From: "faicker.mo" <[email protected]>

Check in func ntuple_filter_to_5tuple is too late for fdir filter rule, add

check

Quoted 4 lines
Quoted 1 line

in func cons_parse_ntuple_filter.

Would you explain more about the intention for this patch?
Though it can be more fast to reject an invalid flow, but why it is too late in

your case?

Quoted 9 lines

Thanks
Qi

Quoted 4 lines
---
 drivers/net/ixgbe/ixgbe_flow.c | 29

+++++++++++++++++++++++++++++

Quoted 3 lines

Review

Quoted 3 lines
 1 file changed, 29 insertions(+)
(quoted diff) +0 -0

b/drivers/net/ixgbe/ixgbe_flow.c

Quoted 4 lines

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action

Quoted 4 lines

index 1adf1b8..f0fafeb 100644

drivers/net/ixgbe/ixgbe_flow.c +0 -0
@@ -363,6 +363,17 @@ const struct rte_flow_action

*next_no_void_action(

Quoted 15 lines
Quoted 15 lines
drivers/net/ixgbe/ixgbe_flow.c +11 -0
 				item, "Not supported by ntuple filter");
 			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;
+		}
 
Quoted 2 lines

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action · line 379

Quoted 2 lines
drivers/net/ixgbe/ixgbe_flow.c +0 -0
 		filter->dst_ip_mask = ipv4_mask->hdr.dst_addr;
 		filter->src_ip_mask = ipv4_mask->hdr.src_addr; @@ -432,6

+443,15

Quoted 36 lines
Quoted 35 lines

@@ const struct rte_flow_action *next_no_void_action(

drivers/net/ixgbe/ixgbe_flow.c +19 -1
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask  = tcp_mask->hdr.src_port; @@ -467,6
+487,15 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask = udp_mask->hdr.src_port;
--

1.8.3.1

#5 lore raw
Quoted 56 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Monday, October 8, 2018 2:46 AM
To: Zhang, Qi Z <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi,

Quoted 8 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Wednesday, September 26, 2018 7:14 PM
To: mocan <[email protected]>; Zhao1, Wei <[email protected]>
Cc: [email protected]
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 4 lines

OK, got your point. We should not reject a possible valid fdir flow at n-tuple flow check stage.

I agree with the point of " We should not reject a possible valid fdir flow at n-tuple flow check stage".
But, I think the fix patch should be more generic for all types filter of this problem.
Maybe, we should delete all " goto out" in function ixgbe_flow_create(). Then, it will go to ntuple filter and ethertype filter, syn filter and fdir filter ,l2_tn_filter one by one.
And aslo, we should code as

{

Ntuple:
..........
if(ret)
Goto ethertype
..........

Ethertype:

..........
if(ret)
Goto fdir filter
.........

fdir filter:

if(ret)
Goto l2_tn_filter

Quoted 8 lines

l2_tn_filter:

.............

}

This fix patch only solve the problem of ntuple and fdir. Qi, What do you think of this?

I'm not the author of this part of code, so my understanding of current implementation is:
It assume a flow will not be ambiguous which means if it match to some filter parser (ixgbe_parse_xxx_filter), it is not necessary to match on a different filter. But I'm not sure if the assumption is correct or not, (this depends on the knowledge of the device capability),
So do you mean the assumption is not correct? If you think a generic fix is necessary, I have below comments

1. it is better be done by Intel people with enough validation
2. two options for patch submit.
Submit a v2 with the generic fix, and it will be captured in this release.
If it is not urgent, we can just accept current one first, then have a separate patch in next release.

Thanks
Qi

Quoted 121 lines
Quoted 121 lines

Thanks
Qi

From: mocan [mailto:[email protected]]
Sent: Wednesday, September 26, 2018 4:16 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi Qi,
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.

Quoted 9 lines · Qi Z

Hi Faicker:

Quoted 7 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of faicker.mo
Sent: Tuesday, September 18, 2018 1:49 PM
To: [email protected]
Cc: faicker.mo <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump

over

Quoted 6 lines
Quoted 6 lines

ntuple filter case

From: "faicker.mo" <[email protected]>

Check in func ntuple_filter_to_5tuple is too late for fdir filter rule, add

check

Quoted 5 lines
Quoted 1 line

in func cons_parse_ntuple_filter.

Would you explain more about the intention for this patch? Though it can be more fast to reject an invalid flow, but why it is too late in

your case?

Quoted 9 lines

Thanks
Qi

Quoted 4 lines
---
 drivers/net/ixgbe/ixgbe_flow.c | 29

+++++++++++++++++++++++++++++

Quoted 3 lines

Review

Quoted 3 lines
 1 file changed, 29 insertions(+)
(quoted diff) +0 -0

b/drivers/net/ixgbe/ixgbe_flow.c

Quoted 4 lines

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action

Quoted 4 lines

index 1adf1b8..f0fafeb 100644

drivers/net/ixgbe/ixgbe_flow.c +0 -0
@@ -363,6 +363,17 @@ const struct rte_flow_action

*next_no_void_action(

Quoted 15 lines
Quoted 15 lines
drivers/net/ixgbe/ixgbe_flow.c +11 -0
 				item, "Not supported by ntuple filter");
 			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;
+		}
 
Quoted 2 lines

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action · line 379

Quoted 2 lines
drivers/net/ixgbe/ixgbe_flow.c +0 -0
 		filter->dst_ip_mask = ipv4_mask->hdr.dst_addr;
 		filter->src_ip_mask = ipv4_mask->hdr.src_addr; @@ -432,6

+443,15

Quoted 36 lines
Quoted 35 lines

@@ const struct rte_flow_action *next_no_void_action(

drivers/net/ixgbe/ixgbe_flow.c +19 -1
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask  = tcp_mask->hdr.src_port; @@ -467,6
+487,15 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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;
 		filter->src_port_mask = udp_mask->hdr.src_port;
--

1.8.3.1

#6 lore raw

Hi, qi

Quoted 73 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Thursday, October 11, 2018 2:36 AM
To: Zhao1, Wei <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 54 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Monday, October 8, 2018 2:46 AM
To: Zhang, Qi Z <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi,

Quoted 8 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Wednesday, September 26, 2018 7:14 PM
To: mocan <[email protected]>; Zhao1, Wei <[email protected]>
Cc: [email protected]
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 4 lines

OK, got your point. We should not reject a possible valid fdir flow at n-tuple flow check stage.

I agree with the point of " We should not reject a possible valid fdir flow at n-tuple flow check stage".
But, I think the fix patch should be more generic for all types filter of this problem.
Maybe, we should delete all " goto out" in function ixgbe_flow_create(). Then, it will go to ntuple filter and ethertype filter, syn filter and fdir filter ,l2_tn_filter one by one.
And aslo, we should code as

{

Ntuple:
..........
if(ret)
Goto ethertype
..........

Ethertype:

..........
if(ret)
Goto fdir filter
.........

fdir filter:

if(ret)
Goto l2_tn_filter

Quoted 8 lines

l2_tn_filter:

.............

}

This fix patch only solve the problem of ntuple and fdir. Qi, What do you think of this?

Quoted 8 lines

I'm not the author of this part of code, so my understanding of current implementation is:
It assume a flow will not be ambiguous which means if it match to some filter parser (ixgbe_parse_xxx_filter), it is not necessary to match on a different filter.
But I'm not sure if the assumption is correct or not, (this depends on the knowledge of the device capability), So do you mean the assumption is not correct? If you think a generic fix is necessary, I have below comments

Yes, the assumption is may cause bug, this patch is an evidence, maybe this user has encountered this problem.

Quoted 2 lines

1. it is better be done by Intel people with enough validation

I agree with you, I will commit a generic fix patch later.

Quoted 4 lines

2. two options for patch submit.
Submit a v2 with the generic fix, and it will be captured in this release. If it is not urgent, we can just accept current one first, then have a
separate patch in next release.

Ok, If someone supply a v2 with the generic fix, I will ack.

Quoted 135 lines

Thanks
Qi

Quoted 67 lines
Quoted 67 lines

Thanks
Qi

From: mocan [mailto:[email protected]]
Sent: Wednesday, September 26, 2018 4:16 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi Qi,
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.

Quoted 9 lines · Qi Z

Hi Faicker:

Quoted 7 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of faicker.mo
Sent: Tuesday, September 18, 2018 1:49 PM
To: [email protected]
Cc: faicker.mo <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump

over

Quoted 6 lines
Quoted 6 lines

ntuple filter case

From: "faicker.mo" <[email protected]>

Check in func ntuple_filter_to_5tuple is too late for fdir filter rule, add

check

Quoted 5 lines
Quoted 1 line

in func cons_parse_ntuple_filter.

Would you explain more about the intention for this patch? Though it can be more fast to reject an invalid flow, but why it is too late in

your case?

Quoted 9 lines

Thanks
Qi

Quoted 4 lines
---
 drivers/net/ixgbe/ixgbe_flow.c | 29

+++++++++++++++++++++++++++++

Quoted 3 lines

Review

Quoted 3 lines
 1 file changed, 29 insertions(+)
(quoted diff) +0 -0

b/drivers/net/ixgbe/ixgbe_flow.c

Quoted 4 lines

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action

Quoted 4 lines

index 1adf1b8..f0fafeb 100644

drivers/net/ixgbe/ixgbe_flow.c +0 -0
@@ -363,6 +363,17 @@ const struct rte_flow_action

*next_no_void_action(

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action *next_no_void_action(

Quoted 5 lines
drivers/net/ixgbe/ixgbe_flow.c +2 -0
 				item, "Not supported by ntuple filter");
 			return -rte_errno;
 		}
+		if ((ipv4_mask->hdr.src_addr != 0 &&
+			ipv4_mask->hdr.src_addr != UINT32_MAX)

||

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action · line 369

Quoted 2 lines
drivers/net/ixgbe/ixgbe_flow.c +2 -0
+			(ipv4_mask->hdr.dst_addr != 0 &&
+			ipv4_mask->hdr.dst_addr != UINT32_MAX)

||

Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action · line 370

Quoted 1 line
drivers/net/ixgbe/ixgbe_flow.c +1 -0
+			(ipv4_mask->hdr.next_proto_id !=

UINT8_MAX &&

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action *next_no_void_action(

Quoted 3 lines
drivers/net/ixgbe/ixgbe_flow.c +3 -0
+			ipv4_mask->hdr.next_proto_id != 0)) {
+			rte_flow_error_set(error,
+				EINVAL,

RTE_FLOW_ERROR_TYPE_ITEM,

Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action · line 374

Quoted 1 line
drivers/net/ixgbe/ixgbe_flow.c +1 -0
+				item, "Not supported by ntuple

filter");

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action *next_no_void_action(

Quoted 5 lines
drivers/net/ixgbe/ixgbe_flow.c +2 -0
+			return -rte_errno;
+		}
 
 		filter->dst_ip_mask = ipv4_mask->hdr.dst_addr;
 		filter->src_ip_mask = ipv4_mask->hdr.src_addr; @@ -432,6

+443,15

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action *next_no_void_action(

Quoted 10 lines

@@ const struct rte_flow_action *next_no_void_action(

drivers/net/ixgbe/ixgbe_flow.c +6 -0
 				item, "Not supported by ntuple filter");
 			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,

Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/net/ixgbe/ixgbe_flow.c

Quoted 1 line
drivers/net/ixgbe/ixgbe_flow.c +1 -0
+				item, "Not supported by ntuple

filter");

Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 5 lines
drivers/net/ixgbe/ixgbe_flow.c +2 -0
+			return -rte_errno;
+		}
 
 		filter->dst_port_mask  = tcp_mask->hdr.dst_port;
 		filter->src_port_mask  = tcp_mask->hdr.src_port; @@ -467,6

drivers/net/ixgbe/ixgbe_flow.c const struct rte_flow_action *next_no_void_action(

Quoted 10 lines
drivers/net/ixgbe/ixgbe_flow.c +7 -0
+487,15 @@ const struct rte_flow_action *next_no_void_action(
 				item, "Not supported by ntuple filter");
 			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,

Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/net/ixgbe/ixgbe_flow.c

Quoted 1 line
drivers/net/ixgbe/ixgbe_flow.c +1 -0
+				item, "Not supported by ntuple

filter");

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
drivers/net/ixgbe/ixgbe_flow.c +2 -1
+			return -rte_errno;
+		}
 
 		filter->dst_port_mask = udp_mask->hdr.dst_port;
 		filter->src_port_mask = udp_mask->hdr.src_port;
--

1.8.3.1

#7 lore raw

Hi Wei:

Quoted 101 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Thursday, October 11, 2018 1:10 AM
To: Zhang, Qi Z <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi, qi

Quoted 25 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Thursday, October 11, 2018 2:36 AM
To: Zhao1, Wei <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 15 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Monday, October 8, 2018 2:46 AM
To: Zhang, Qi Z <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi,

Quoted 4 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Wednesday, September 26, 2018 7:14 PM
To: mocan <[email protected]>; Zhao1, Wei

<[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Cc: [email protected]
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

OK, got your point. We should not reject a possible valid fdir flow at n-tuple flow check stage.

Quoted 8 lines
Quoted 8 lines
Quoted 1 line

I agree with the point of " We should not reject a possible valid fdir flow at n-tuple flow check stage".
But, I think the fix patch should be more generic for all types filter of this problem.
Maybe, we should delete all " goto out" in function

ixgbe_flow_create().

Quoted 33 lines
Quoted 24 lines

Then, it will go to ntuple filter and ethertype filter, syn filter and fdir filter ,l2_tn_filter one by one.
And aslo, we should code as

{

Ntuple:
..........
if(ret)
Goto ethertype
..........

Ethertype:

..........
if(ret)
Goto fdir filter
.........

fdir filter:

if(ret)
Goto l2_tn_filter

Quoted 8 lines

l2_tn_filter:

.............

}

This fix patch only solve the problem of ntuple and fdir. Qi, What do you think of this?

Quoted 9 lines

I'm not the author of this part of code, so my understanding of current implementation is:
It assume a flow will not be ambiguous which means if it match to some filter parser (ixgbe_parse_xxx_filter), it is not necessary to match on a different filter.
But I'm not sure if the assumption is correct or not, (this depends on the knowledge of the device capability), So do you mean the assumption is not correct? If you think a generic fix is necessary, I have below comments

Yes, the assumption is may cause bug, this patch is an evidence, maybe this user has encountered this problem.

Quoted 2 lines

1. it is better be done by Intel people with enough validation

Quoted 9 lines

I agree with you, I will commit a generic fix patch later.

Quoted 4 lines

2. two options for patch submit.
Submit a v2 with the generic fix, and it will be captured in this release. If it is not urgent, we can just accept current one first, then have
a separate patch in next release.

Ok, If someone supply a v2 with the generic fix, I will ack.

Just want to confirm with you , are you agree to merge this patch? Or you think v2 with generic fix is necessary?

Quoted 1 line

From my view, the patch can be accepted, since it just add more strict check in cons_parse_ntuple_filter, it does not break anything, and it fix the specific issue.

Thanks
Qi

Acked-by
#8 lore raw
Quoted 124 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Monday, October 15, 2018 11:31 AM
To: Zhao1, Wei <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi Wei:

Quoted 102 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Thursday, October 11, 2018 1:10 AM
To: Zhang, Qi Z <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi, qi

Quoted 26 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Thursday, October 11, 2018 2:36 AM
To: Zhao1, Wei <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 16 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Monday, October 8, 2018 2:46 AM
To: Zhang, Qi Z <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi,

Quoted 4 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Wednesday, September 26, 2018 7:14 PM
To: mocan <[email protected]>; Zhao1, Wei

<[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Cc: [email protected]
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

OK, got your point. We should not reject a possible valid fdir flow at n-tuple flow check stage.

Quoted 8 lines
Quoted 8 lines
Quoted 1 line

I agree with the point of " We should not reject a possible valid fdir flow at n-tuple flow check stage".
But, I think the fix patch should be more generic for all types filter of this problem.
Maybe, we should delete all " goto out" in function

ixgbe_flow_create().

Quoted 33 lines
Quoted 24 lines

Then, it will go to ntuple filter and ethertype filter, syn filter and fdir filter ,l2_tn_filter one by one. And aslo, we should code as

{

Ntuple:
..........
if(ret)
Goto ethertype
..........

Ethertype:

..........
if(ret)
Goto fdir filter
.........

fdir filter:

if(ret)
Goto l2_tn_filter

Quoted 8 lines

l2_tn_filter:

.............

}

This fix patch only solve the problem of ntuple and fdir. Qi, What do you think of this?

Quoted 9 lines

I'm not the author of this part of code, so my understanding of current implementation is:
It assume a flow will not be ambiguous which means if it match to some filter parser (ixgbe_parse_xxx_filter), it is not necessary to match on a different filter.
But I'm not sure if the assumption is correct or not, (this depends on the knowledge of the device capability), So do you mean the assumption is not correct? If you think a generic fix is necessary, I have below comments

Yes, the assumption is may cause bug, this patch is an evidence, maybe this user has encountered this problem.

Quoted 2 lines

1. it is better be done by Intel people with enough validation

Quoted 9 lines

I agree with you, I will commit a generic fix patch later.

Quoted 4 lines

2. two options for patch submit.
Submit a v2 with the generic fix, and it will be captured in this release. If it is not urgent, we can just accept current one first, then
have a separate patch in next release.

Ok, If someone supply a v2 with the generic fix, I will ack.

Quoted 10 lines

Just want to confirm with you , are you agree to merge this patch? Or you think v2 with generic fix is necessary?
From my view, the patch can be accepted, since it just add more strict check in cons_parse_ntuple_filter, it does not break anything, and it fix the specific issue.

Thanks
Qi

Of course, it can be merge, but a more generic still need.

Applied
#9 lore raw
Quoted 142 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, October 16, 2018 10:57 PM
To: Zhang, Qi Z <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 8 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Monday, October 15, 2018 11:31 AM
To: Zhao1, Wei <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 16 lines

Hi Wei:

Quoted 14 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Thursday, October 11, 2018 1:10 AM
To: Zhang, Qi Z <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi, qi

Quoted 4 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Thursday, October 11, 2018 2:36 AM
To: Zhao1, Wei <[email protected]>; mocan

<[email protected]>

Quoted 86 lines
Quoted 86 lines
Quoted 22 lines

Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Quoted 16 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Monday, October 8, 2018 2:46 AM
To: Zhang, Qi Z <[email protected]>; mocan <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

Hi,

Quoted 4 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Wednesday, September 26, 2018 7:14 PM
To: mocan <[email protected]>; Zhao1, Wei

<[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Cc: [email protected]
Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

OK, got your point. We should not reject a possible valid fdir flow at n-tuple flow check stage.

Quoted 8 lines
Quoted 8 lines
Quoted 1 line

I agree with the point of " We should not reject a possible valid fdir flow at n-tuple flow check stage".
But, I think the fix patch should be more generic for all types filter of this problem.
Maybe, we should delete all " goto out" in function

ixgbe_flow_create().

Quoted 33 lines
Quoted 24 lines

Then, it will go to ntuple filter and ethertype filter, syn filter and fdir filter ,l2_tn_filter one by one. And aslo, we should code as

{

Ntuple:
..........
if(ret)
Goto ethertype
..........

Ethertype:

..........
if(ret)
Goto fdir filter
.........

fdir filter:

if(ret)
Goto l2_tn_filter

Quoted 8 lines

l2_tn_filter:

.............

}

This fix patch only solve the problem of ntuple and fdir. Qi, What do you think of this?

Quoted 9 lines

I'm not the author of this part of code, so my understanding of current implementation is:
It assume a flow will not be ambiguous which means if it match to some filter parser (ixgbe_parse_xxx_filter), it is not necessary to match on a different filter.
But I'm not sure if the assumption is correct or not, (this depends on the knowledge of the device capability), So do you mean the assumption is not correct? If you think a generic fix is necessary, I have below comments

Yes, the assumption is may cause bug, this patch is an evidence, maybe this user has encountered this problem.

Quoted 1 line
Quoted 6 lines
Quoted 6 lines
Quoted 1 line

1. it is better be done by Intel people with enough validation

I agree with you, I will commit a generic fix patch later.

Quoted 2 lines

2. two options for patch submit.
Submit a v2 with the generic fix, and it will be captured in this

release.

Quoted 12 lines
Quoted 5 lines
Quoted 2 lines

If it is not urgent, we can just accept current one first, then
have a separate patch in next release.

Ok, If someone supply a v2 with the generic fix, I will ack.

Just want to confirm with you , are you agree to merge this patch? Or you think v2 with generic fix is necessary?
From my view, the patch can be accepted, since it just add more strict check in cons_parse_ntuple_filter, it does not break anything, and it fix the specific issue.

Quoted 7 lines
Quoted 4 lines

Thanks
Qi

Of course, it can be merge, but a more generic still need.

Applied to dpdk-next-net-intel with below changes

1) change the title to "fix to reject a valid flow during ntuple check"
2) more detail commit log base on auther's comment in mail list
3) add fix line and Cc [email protected]

Thanks
Qi