net/ice: support RSS in SSE path
[dpdk.git] / drivers / net / ice / ice_generic_flow.c
index 5725bff..1c0adc7 100644 (file)
@@ -13,6 +13,7 @@
 #include <rte_ether.h>
 #include <rte_ethdev_driver.h>
 #include <rte_malloc.h>
+#include <rte_tailq.h>
 
 #include "ice_ethdev.h"
 #include "ice_generic_flow.h"
@@ -463,6 +464,10 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
                                           "Invalid VXLAN item");
                                return 0;
                        }
+                       if (vxlan_mask && vxlan_mask->vni[0] == UINT8_MAX &&
+                                       vxlan_mask->vni[1] == UINT8_MAX &&
+                                       vxlan_mask->vni[2] == UINT8_MAX)
+                               input_set |= ICE_INSET_TUN_ID;
                        is_tunnel = 1;
 
                        break;
@@ -481,6 +486,10 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
                                           "Invalid NVGRE item");
                                return 0;
                        }
+                       if (nvgre_mask && nvgre_mask->tni[0] == UINT8_MAX &&
+                                       nvgre_mask->tni[1] == UINT8_MAX &&
+                                       nvgre_mask->tni[2] == UINT8_MAX)
+                               input_set |= ICE_INSET_TUN_ID;
                        is_tunnel = 1;
 
                        break;
@@ -664,9 +673,10 @@ ice_flow_flush(struct rte_eth_dev *dev,
 {
        struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
        struct rte_flow *p_flow;
+       void *temp;
        int ret = 0;
 
-       TAILQ_FOREACH(p_flow, &pf->flow_list, node) {
+       TAILQ_FOREACH_SAFE(p_flow, &pf->flow_list, node, temp) {
                ret = ice_flow_destroy(dev, p_flow, error);
                if (ret) {
                        rte_flow_error_set(error, -ret,