[dpdk-dev,v2,1/2] net/ixgbe: remove a useless item type check

Message ID 1493274846-59784-1-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Zhao1, Wei April 27, 2017, 6:34 a.m. UTC
  Remove a useless item type check for fdir flow rule.

v2:
-delete item type check of vlan

aFixes: 11777435c72 ("net/ixgbe: parse flow director filter")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_flow.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)
  

Comments

Wenzhuo Lu April 27, 2017, 7:15 a.m. UTC | #1
Hi,


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao
> Sent: Thursday, April 27, 2017 2:34 PM
> To: dev@dpdk.org
> Cc: Zhao1, Wei
> Subject: [dpdk-dev] [PATCH v2 1/2] net/ixgbe: remove a useless item type
> check
> 
> Remove a useless item type check for fdir flow rule.
> 
> v2:
> -delete item type check of vlan
> 
> aFixes: 11777435c72 ("net/ixgbe: parse flow director filter")
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
  
Ferruh Yigit April 27, 2017, 9:17 a.m. UTC | #2
On 4/27/2017 8:15 AM, Lu, Wenzhuo wrote:
> Hi,
> 
> 
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao
>> Sent: Thursday, April 27, 2017 2:34 PM
>> To: dev@dpdk.org
>> Cc: Zhao1, Wei
>> Subject: [dpdk-dev] [PATCH v2 1/2] net/ixgbe: remove a useless item type
>> check
>>
>> Remove a useless item type check for fdir flow rule.
>>
>> v2:
>> -delete item type check of vlan
>>
>> aFixes: 11777435c72 ("net/ixgbe: parse flow director filter")
>>
>> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Series applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 98e414a..59ddba6 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -2305,27 +2305,10 @@  ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 		rule->mask.vlan_tci_mask &= rte_cpu_to_be_16(0xEFFF);
 		/* More than one tags are not supported. */
 
-		/**
-		 * Check if the next not void item is not vlan.
-		 */
-		index++;
-		NEXT_ITEM_OF_PATTERN(item, pattern, index);
-		if (item->type == RTE_FLOW_ITEM_TYPE_VLAN) {
-			memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
-			rte_flow_error_set(error, EINVAL,
-				RTE_FLOW_ERROR_TYPE_ITEM,
-				item, "Not supported by fdir filter");
-			return -rte_errno;
-		} else if (item->type != RTE_FLOW_ITEM_TYPE_END) {
-			memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
-			rte_flow_error_set(error, EINVAL,
-				RTE_FLOW_ERROR_TYPE_ITEM,
-				item, "Not supported by fdir filter");
-			return -rte_errno;
-		}
 		/* check if the next not void item is END */
 		index++;
 		NEXT_ITEM_OF_PATTERN(item, pattern, index);
+
 		if (item->type != RTE_FLOW_ITEM_TYPE_END) {
 			memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
 			rte_flow_error_set(error, EINVAL,