net/i40e: fix parsing packet type for NEON
[dpdk.git] / drivers / net / iavf / iavf_hash.c
index ebaac58..d8d22f8 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <rte_debug.h>
 #include <rte_ether.h>
-#include <rte_ethdev_driver.h>
+#include <ethdev_driver.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_eth_ctrl.h>
@@ -597,11 +597,12 @@ iavf_hash_parse_pattern(const struct rte_flow_item pattern[], uint64_t *phint,
                        break;
                case RTE_FLOW_ITEM_TYPE_ECPRI:
                        ecpri = item->spec;
-                       ecpri_common.u32 = rte_be_to_cpu_32(
-                                               ecpri->hdr.common.u32);
                        if (!ecpri)
                                break;
-                       else if (ecpri_common.type !=
+
+                       ecpri_common.u32 = rte_be_to_cpu_32(ecpri->hdr.common.u32);
+
+                       if (ecpri_common.type !=
                                 RTE_ECPRI_MSG_TYPE_IQ_DATA) {
                                rte_flow_error_set(error, EINVAL,
                                        RTE_FLOW_ERROR_TYPE_ITEM, item,
@@ -926,6 +927,13 @@ iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
                if (rss_type & (ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY |
                    ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY))
                        return true;
+
+               if (!(rss_type &
+                  (ETH_RSS_IPV4 | ETH_RSS_IPV6 |
+                   ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV6_UDP |
+                   ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_NONFRAG_IPV6_TCP |
+                   ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_NONFRAG_IPV6_SCTP)))
+                       return true;
        }
 
        /* check invalid combination */