net/cxgbe: support to flush flows in HASH region
authorShagun Agrawal <shaguna@chelsio.com>
Fri, 29 Jun 2018 18:12:22 +0000 (23:42 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 4 Jul 2018 20:20:41 +0000 (22:20 +0200)
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
drivers/net/cxgbe/cxgbe_flow.c

index 48df62a..4f00ac4 100644 (file)
@@ -730,6 +730,19 @@ static int cxgbe_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *e)
                                goto out;
                }
        }
+
+       if (is_hashfilter(adap) && adap->tids.tid_tab) {
+               struct filter_entry *f;
+
+               for (i = adap->tids.hash_base; i <= adap->tids.ntids; i++) {
+                       f = (struct filter_entry *)adap->tids.tid_tab[i];
+
+                       ret = cxgbe_check_n_destroy(f, dev, e);
+                       if (ret < 0)
+                               goto out;
+               }
+       }
+
 out:
        return ret >= 0 ? 0 : ret;
 }