net/ixgbe: fix duplicated check
authorFerruh Yigit <ferruh.yigit@intel.com>
Tue, 11 Apr 2017 14:24:15 +0000 (15:24 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000 (15:37 +0200)
Same check duplicated, updated check according what commend states.

Coverity issue: 1407507
Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
drivers/net/ixgbe/ixgbe_flow.c

index 35db317..af76009 100644 (file)
@@ -2231,7 +2231,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
        index++;
        NEXT_ITEM_OF_PATTERN(item, pattern, index);
        if ((item->type != RTE_FLOW_ITEM_TYPE_VLAN) &&
-               (item->type != RTE_FLOW_ITEM_TYPE_VLAN)) {
+               (item->type != RTE_FLOW_ITEM_TYPE_IPV4)) {
                memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
                rte_flow_error_set(error, EINVAL,
                        RTE_FLOW_ERROR_TYPE_ITEM,