From 0601d85d90be91ed8d174221b15963c3e9fbfc59 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Thu, 1 Jun 2017 13:36:43 -0400 Subject: [PATCH] net/ixgbe: remove redundant code Remove redundant code. item->type != RTE_FLOW_ITEM_TYPE_END already cover item->type == RTE_FLOW_ITEM_TYPE_VLAN. Signed-off-by: Qi Zhang Acked-by: Wenzhuo Lu --- drivers/net/ixgbe/ixgbe_flow.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 29e5ddc5c8..ba6c0d3af2 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -1544,18 +1544,10 @@ ixgbe_parse_fdir_filter_normal(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. - */ + /* Next not void item must be END */ 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) { + 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, -- 2.20.1